Go to the documentation of this file.
23 RISCVELFObjectWriter(uint8_t OSABI,
bool Is64Bit);
25 ~RISCVELFObjectWriter()
override;
29 bool needsRelocateWithSymbol(
const MCSymbol &Sym,
30 unsigned Type)
const override {
38 const MCFixup &Fixup,
bool IsPCRel)
const override;
42 RISCVELFObjectWriter::RISCVELFObjectWriter(uint8_t OSABI,
bool Is64Bit)
46 RISCVELFObjectWriter::~RISCVELFObjectWriter() =
default;
48 unsigned RISCVELFObjectWriter::getRelocType(
MCContext &Ctx,
61 return ELF::R_RISCV_NONE;
74 return ELF::R_RISCV_TLS_GOT_HI20;
76 return ELF::R_RISCV_TLS_GD_HI20;
111 return ELF::R_RISCV_NONE;
114 return ELF::R_RISCV_NONE;
117 return ELF::R_RISCV_NONE;
132 return ELF::R_RISCV_TPREL_HI20;
134 return ELF::R_RISCV_TPREL_LO12_I;
136 return ELF::R_RISCV_TPREL_LO12_S;
138 return ELF::R_RISCV_TPREL_ADD;
140 return ELF::R_RISCV_RELAX;
142 return ELF::R_RISCV_ALIGN;
172 std::unique_ptr<MCObjectTargetWriter>
174 return std::make_unique<RISCVELFObjectWriter>(OSABI, Is64Bit);
@ fixup_riscv_pcrel_lo12_i
This is an optimization pass for GlobalISel generic memory operations.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Context object for machine code objects.
@ R_RISCV_SET6
Local label assignment.
Target - Wrapper for Target specific information.
@ fixup_riscv_tls_gd_hi20
@ R_RISCV_PCREL_LO12_S
Low 12 bits of PC relative relocation, used by S type instruction format.
@ R_RISCV_RVC_JUMP
11-bit PC-relative jump offset
The instances of the Type class are immutable: once they are created, they are never changed.
@ R_RISCV_ADD8
8 bits label addition
@ R_RISCV_64
A plain 64-bit pointer value relocation.
@ fixup_riscv_pcrel_lo12_s
@ R_RISCV_SUB64
64 bits label subtraction
@ FirstLiteralRelocationKind
The range [FirstLiteralRelocationKind, MaxTargetFixupKind) is used for relocations coming from ....
@ FK_Data_4
A four-byte fixup.
@ fixup_riscv_tls_got_hi20
@ Target
Target specific expression.
@ R_RISCV_SET32
Local label assignment.
@ R_RISCV_HI20
High 20 bits of 32-bit pointer value relocation.
@ R_RISCV_32
A plain 32-bit pointer value relocation.
@ R_RISCV_CALL_PLT
PC relative call by PLT.
@ R_RISCV_LO12_I
Low 12 bits of 32-bit pointer value relocation.
@ R_RISCV_PCREL_LO12_I
Low 12 bits of PC relative relocation, used by I type instruction format.
@ R_RISCV_SET8
Local label assignment.
@ R_RISCV_PCREL_HI20
High 20 bits of PC relative relocation.
@ fixup_riscv_tprel_lo12_s
@ R_RISCV_ADD16
16 bits label addition
@ R_RISCV_ADD32
32 bits label addition
std::unique_ptr< MCObjectTargetWriter > createRISCVELFObjectWriter(uint8_t OSABI, bool Is64Bit)
@ R_RISCV_SUB6
6 bits label subtraction
@ fixup_riscv_tprel_lo12_i
void reportError(SMLoc L, const Twine &Msg)
@ FK_Data_1
A one-byte fixup.
@ FK_PCRel_4
A four-byte pc relative fixup.
@ R_RISCV_SUB8
8 bits label subtraction
PowerPC TLS Dynamic Call Fixup
@ R_RISCV_LO12_S
Low 12 bits of 32-bit pointer value relocation, used by S type instruction format.
@ R_RISCV_JAL
High 20 bits of PC-relative jump pointer value relocation.
@ R_RISCV_ADD64
64 bits label addition
@ R_RISCV_32_PCREL
32 bits PC relative relocation
@ R_RISCV_GOT_HI20
PC relative GOT offset.
@ R_RISCV_RVC_BRANCH
8-bit PC-relative branch offset
@ FK_Data_8
A eight-byte fixup.
@ R_RISCV_BRANCH
PC-relative branch pointer value relocation.
This represents an "assembler immediate".
@ R_RISCV_SET16
Local label assignment.
@ R_RISCV_SUB32
32 bits label subtraction
@ FK_Data_2
A two-byte fixup.
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Base class for the full range of assembler expressions which are needed for parsing.
@ R_RISCV_SUB16
16 bits label subtraction