24 LoongArchELFObjectWriter(
uint8_t OSABI,
bool Is64Bit);
26 ~LoongArchELFObjectWriter()
override;
34 bool IsPCRel)
const override;
38LoongArchELFObjectWriter::LoongArchELFObjectWriter(
uint8_t OSABI,
bool Is64Bit)
42LoongArchELFObjectWriter::~LoongArchELFObjectWriter() {}
44unsigned LoongArchELFObjectWriter::getRelocType(
const MCFixup &
Fixup,
47 switch (
Target.getSpecifier()) {
48 case ELF::R_LARCH_TLS_LE_HI20:
49 case ELF::R_LARCH_TLS_IE_PC_HI20:
50 case ELF::R_LARCH_TLS_IE_HI20:
51 case ELF::R_LARCH_TLS_LD_PC_HI20:
52 case ELF::R_LARCH_TLS_LD_HI20:
53 case ELF::R_LARCH_TLS_GD_PC_HI20:
54 case ELF::R_LARCH_TLS_GD_HI20:
55 case ELF::R_LARCH_TLS_DESC_PC_HI20:
56 case ELF::R_LARCH_TLS_DESC_HI20:
57 case ELF::R_LARCH_TLS_LE_HI20_R:
58 case ELF::R_LARCH_TLS_LD_PCREL20_S2:
59 case ELF::R_LARCH_TLS_GD_PCREL20_S2:
60 case ELF::R_LARCH_TLS_DESC_PCREL20_S2:
74 return ELF::R_LARCH_NONE;
77 return ELF::R_LARCH_NONE;
80 return ELF::R_LARCH_NONE;
82 return IsPCRel ? ELF::R_LARCH_32_PCREL : ELF::R_LARCH_32;
84 return IsPCRel ? ELF::R_LARCH_64_PCREL : ELF::R_LARCH_64;
86 return ELF::R_LARCH_B16;
88 return ELF::R_LARCH_B21;
90 return ELF::R_LARCH_B26;
92 return ELF::R_LARCH_ABS_HI20;
94 return ELF::R_LARCH_ABS_LO12;
96 return ELF::R_LARCH_ABS64_LO20;
98 return ELF::R_LARCH_ABS64_HI12;
102std::unique_ptr<MCObjectTargetWriter>
104 return std::make_unique<LoongArchELFObjectWriter>(OSABI, Is64Bit);
static Error reportError(StringRef Message)
PowerPC TLS Dynamic Call Fixup
virtual unsigned getRelocType(const MCFixup &Fixup, const MCValue &Target, bool IsPCRel) const =0
virtual bool needsRelocateWithSymbol(const MCValue &, unsigned Type) const
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Target - Wrapper for Target specific information.
The instances of the Type class are immutable: once they are created, they are never changed.
@ fixup_loongarch_abs64_hi12
@ fixup_loongarch_abs_hi20
@ fixup_loongarch_abs_lo12
@ fixup_loongarch_abs64_lo20
bool isRelocation(MCFixupKind FixupKind)
This is an optimization pass for GlobalISel generic memory operations.
@ FK_Data_8
A eight-byte fixup.
@ FK_Data_1
A one-byte fixup.
@ FK_Data_4
A four-byte fixup.
@ FK_Data_2
A two-byte fixup.
std::unique_ptr< MCObjectTargetWriter > createLoongArchELFObjectWriter(uint8_t OSABI, bool Is64Bit)