23 LoongArchELFObjectWriter(uint8_t OSABI,
bool Is64Bit,
bool EnableRelax);
25 ~LoongArchELFObjectWriter()
override;
28 unsigned Type)
const override {
39LoongArchELFObjectWriter::LoongArchELFObjectWriter(uint8_t OSABI,
bool Is64Bit,
43 EnableRelax(EnableRelax) {}
45LoongArchELFObjectWriter::~LoongArchELFObjectWriter() {}
47unsigned LoongArchELFObjectWriter::getRelocType(
MCContext &Ctx,
60 return ELF::R_LARCH_NONE;
63 return ELF::R_LARCH_NONE;
66 return ELF::R_LARCH_NONE;
68 return IsPCRel ? ELF::R_LARCH_32_PCREL : ELF::R_LARCH_32;
70 return IsPCRel ? ELF::R_LARCH_64_PCREL : ELF::R_LARCH_64;
72 return ELF::R_LARCH_B16;
74 return ELF::R_LARCH_B21;
76 return ELF::R_LARCH_B26;
78 return ELF::R_LARCH_ABS_HI20;
80 return ELF::R_LARCH_ABS_LO12;
82 return ELF::R_LARCH_ABS64_LO20;
84 return ELF::R_LARCH_ABS64_HI12;
86 return ELF::R_LARCH_TLS_LE_HI20;
88 return ELF::R_LARCH_TLS_LE_LO12;
90 return ELF::R_LARCH_TLS_LE64_LO20;
92 return ELF::R_LARCH_TLS_LE64_HI12;
94 return ELF::R_LARCH_CALL36;
99std::unique_ptr<MCObjectTargetWriter>
101 return std::make_unique<LoongArchELFObjectWriter>(OSABI, Is64Bit, Relax);
PowerPC TLS Dynamic Call Fixup
Context object for machine code objects.
void reportError(SMLoc L, const Twine &Msg)
virtual bool needsRelocateWithSymbol(const MCValue &Val, const MCSymbol &Sym, unsigned Type) const
virtual unsigned getRelocType(MCContext &Ctx, const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const =0
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 ...
This represents an "assembler immediate".
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_tls_le_lo12
@ fixup_loongarch_abs_hi20
@ fixup_loongarch_abs_lo12
@ fixup_loongarch_abs64_lo20
@ fixup_loongarch_tls_le64_hi12
@ fixup_loongarch_tls_le64_lo20
@ fixup_loongarch_tls_le_hi20
This is an optimization pass for GlobalISel generic memory operations.
std::unique_ptr< MCObjectTargetWriter > createLoongArchELFObjectWriter(uint8_t OSABI, bool Is64Bit, bool Relax)
@ FirstLiteralRelocationKind
The range [FirstLiteralRelocationKind, MaxTargetFixupKind) is used for relocations coming from ....
@ 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.