24 RISCVELFObjectWriter(
uint8_t OSABI,
bool Is64Bit);
26 ~RISCVELFObjectWriter()
override;
31 unsigned Type)
const override {
43RISCVELFObjectWriter::RISCVELFObjectWriter(
uint8_t OSABI,
bool Is64Bit)
47RISCVELFObjectWriter::~RISCVELFObjectWriter() =
default;
49unsigned RISCVELFObjectWriter::getRelocType(
MCContext &Ctx,
62 return ELF::R_RISCV_NONE;
67 : ELF::R_RISCV_32_PCREL;
69 return ELF::R_RISCV_PCREL_HI20;
71 return ELF::R_RISCV_PCREL_LO12_I;
73 return ELF::R_RISCV_PCREL_LO12_S;
75 return ELF::R_RISCV_GOT_HI20;
77 return ELF::R_RISCV_TLS_GOT_HI20;
79 return ELF::R_RISCV_TLS_GD_HI20;
81 return ELF::R_RISCV_TLSDESC_HI20;
83 return ELF::R_RISCV_TLSDESC_LOAD_LO12;
85 return ELF::R_RISCV_TLSDESC_ADD_LO12;
87 return ELF::R_RISCV_TLSDESC_CALL;
89 return ELF::R_RISCV_JAL;
91 return ELF::R_RISCV_BRANCH;
93 return ELF::R_RISCV_RVC_JUMP;
95 return ELF::R_RISCV_RVC_BRANCH;
97 return ELF::R_RISCV_CALL_PLT;
99 return ELF::R_RISCV_CALL_PLT;
106 return ELF::R_RISCV_NONE;
108 return ELF::R_RISCV_TLSDESC_LOAD_LO12;
110 return ELF::R_RISCV_TLSDESC_ADD_LO12;
112 return ELF::R_RISCV_TLSDESC_CALL;
116 return ELF::R_RISCV_NONE;
119 return ELF::R_RISCV_NONE;
123 return ELF::R_RISCV_32_PCREL;
125 return ELF::R_RISCV_GOT32_PCREL;
126 return ELF::R_RISCV_32;
128 return ELF::R_RISCV_64;
130 return ELF::R_RISCV_HI20;
132 return ELF::R_RISCV_LO12_I;
134 return ELF::R_RISCV_LO12_S;
136 return ELF::R_RISCV_TPREL_HI20;
138 return ELF::R_RISCV_TPREL_LO12_I;
140 return ELF::R_RISCV_TPREL_LO12_S;
142 return ELF::R_RISCV_TPREL_ADD;
144 return ELF::R_RISCV_RELAX;
146 return ELF::R_RISCV_ALIGN;
150std::unique_ptr<MCObjectTargetWriter>
152 return std::make_unique<RISCVELFObjectWriter>(OSABI, Is64Bit);
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
Base class for the full range of assembler expressions which are needed for parsing.
@ Target
Target specific expression.
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_riscv_tprel_lo12_s
@ fixup_riscv_tls_got_hi20
@ fixup_riscv_tls_gd_hi20
@ fixup_riscv_pcrel_lo12_i
@ fixup_riscv_tlsdesc_call
@ fixup_riscv_pcrel_lo12_s
@ fixup_riscv_tprel_lo12_i
@ fixup_riscv_tlsdesc_load_lo12
@ fixup_riscv_tlsdesc_hi20
@ fixup_riscv_tlsdesc_add_lo12
This is an optimization pass for GlobalISel generic memory operations.
std::unique_ptr< MCObjectTargetWriter > createRISCVELFObjectWriter(uint8_t OSABI, bool Is64Bit)
@ FK_PCRel_4
A four-byte pc relative fixup.
@ 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.