24 VEELFObjectWriter(
uint8_t OSABI)
28 ~VEELFObjectWriter()
override =
default;
35 unsigned Type)
const override;
42 if (
const VEMCExpr *SExpr = dyn_cast<VEMCExpr>(
Fixup.getValue())) {
44 return ELF::R_VE_PC_LO32;
48 switch (
Fixup.getTargetKind()) {
51 return ELF::R_VE_NONE;
55 "1-byte pc-relative data relocation is not supported");
56 return ELF::R_VE_NONE;
60 "2-byte pc-relative data relocation is not supported");
61 return ELF::R_VE_NONE;
64 return ELF::R_VE_SREL32;
68 "8-byte pc-relative data relocation is not supported");
69 return ELF::R_VE_NONE;
72 return ELF::R_VE_SREL32;
74 return ELF::R_VE_PC_HI32;
76 return ELF::R_VE_PC_LO32;
80 switch (
Fixup.getTargetKind()) {
83 return ELF::R_VE_NONE;
86 return ELF::R_VE_NONE;
89 return ELF::R_VE_NONE;
91 return ELF::R_VE_REFLONG;
93 return ELF::R_VE_REFQUAD;
95 return ELF::R_VE_REFLONG;
98 "A non pc-relative srel32 relocation is not supported");
99 return ELF::R_VE_NONE;
101 return ELF::R_VE_HI32;
103 return ELF::R_VE_LO32;
106 "A non pc-relative pc_hi32 relocation is not supported");
107 return ELF::R_VE_NONE;
110 "A non pc-relative pc_lo32 relocation is not supported");
111 return ELF::R_VE_NONE;
113 return ELF::R_VE_GOT_HI32;
115 return ELF::R_VE_GOT_LO32;
117 return ELF::R_VE_GOTOFF_HI32;
119 return ELF::R_VE_GOTOFF_LO32;
121 return ELF::R_VE_PLT_HI32;
123 return ELF::R_VE_PLT_LO32;
125 return ELF::R_VE_TLS_GD_HI32;
127 return ELF::R_VE_TLS_GD_LO32;
129 return ELF::R_VE_TPOFF_HI32;
131 return ELF::R_VE_TPOFF_LO32;
134 return ELF::R_VE_NONE;
137bool VEELFObjectWriter::needsRelocateWithSymbol(
const MCValue &,
139 unsigned Type)
const {
148 case ELF::R_VE_GOT_HI32:
149 case ELF::R_VE_GOT_LO32:
150 case ELF::R_VE_GOTOFF_HI32:
151 case ELF::R_VE_GOTOFF_LO32:
152 case ELF::R_VE_TLS_GD_HI32:
153 case ELF::R_VE_TLS_GD_LO32:
158std::unique_ptr<MCObjectTargetWriter>
160 return std::make_unique<VEELFObjectWriter>(OSABI);
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_ve_srel32
fixup_ve_srel32 - 32-bit fixup corresponding to foo for relative branch
@ fixup_ve_got_hi32
fixup_ve_got_hi32 - 32-bit fixup corresponding to foo@got_hi
@ fixup_ve_gotoff_hi32
fixup_ve_gotoff_hi32 - 32-bit fixup corresponding to foo@gotoff_hi
@ fixup_ve_got_lo32
fixup_ve_got_lo32 - 32-bit fixup corresponding to foo@got_lo
@ fixup_ve_pc_hi32
fixup_ve_pc_hi32 - 32-bit fixup corresponding to foo@pc_hi
@ fixup_ve_lo32
fixup_ve_lo32 - 32-bit fixup corresponding to foo@lo
@ fixup_ve_gotoff_lo32
fixup_ve_gotoff_lo32 - 32-bit fixup corresponding to foo@gotoff_lo
@ fixup_ve_hi32
fixup_ve_hi32 - 32-bit fixup corresponding to foo@hi
@ fixup_ve_pc_lo32
fixup_ve_pc_lo32 - 32-bit fixup corresponding to foo@pc_lo
@ fixup_ve_plt_hi32
fixup_ve_plt_hi32/lo32
@ fixup_ve_reflong
fixup_ve_reflong - 32-bit fixup corresponding to foo
@ fixup_ve_tls_gd_hi32
fixups for Thread Local Storage
This is an optimization pass for GlobalISel generic memory operations.
@ FK_PCRel_4
A four-byte pc relative fixup.
@ FK_PCRel_2
A two-byte pc relative fixup.
@ FK_Data_8
A eight-byte fixup.
@ FK_Data_1
A one-byte fixup.
@ FK_Data_4
A four-byte fixup.
@ FK_PCRel_8
A eight-byte pc relative fixup.
@ FK_PCRel_1
A one-byte pc relative fixup.
@ FK_Data_2
A two-byte fixup.
std::unique_ptr< MCObjectTargetWriter > createVEELFObjectWriter(uint8_t OSABI)