25 VEELFObjectWriter(uint8_t OSABI)
29 ~VEELFObjectWriter()
override =
default;
32 unsigned getRelocType(
const MCFixup &,
const MCValue &,
33 bool IsPCRel)
const override;
35 bool needsRelocateWithSymbol(
const MCValue &,
unsigned Type)
const override;
39unsigned VEELFObjectWriter::getRelocType(
const MCFixup &
Fixup,
42 switch (
Target.getSpecifier()) {
55 return ELF::R_VE_PC_LO32;
59 switch (
Fixup.getKind()) {
62 return ELF::R_VE_NONE;
65 "1-byte pc-relative data relocation is not supported");
66 return ELF::R_VE_NONE;
69 "2-byte pc-relative data relocation is not supported");
70 return ELF::R_VE_NONE;
72 return ELF::R_VE_SREL32;
75 "8-byte pc-relative data relocation is not supported");
76 return ELF::R_VE_NONE;
79 return ELF::R_VE_SREL32;
81 return ELF::R_VE_PC_HI32;
83 return ELF::R_VE_PC_LO32;
87 switch (
Fixup.getKind()) {
90 return ELF::R_VE_NONE;
93 return ELF::R_VE_NONE;
96 return ELF::R_VE_NONE;
98 return ELF::R_VE_REFLONG;
100 return ELF::R_VE_REFQUAD;
102 return ELF::R_VE_REFLONG;
105 "A non pc-relative srel32 relocation is not supported");
106 return ELF::R_VE_NONE;
108 return ELF::R_VE_HI32;
110 return ELF::R_VE_LO32;
113 "A non pc-relative pc_hi32 relocation is not supported");
114 return ELF::R_VE_NONE;
117 "A non pc-relative pc_lo32 relocation is not supported");
118 return ELF::R_VE_NONE;
120 return ELF::R_VE_GOT_HI32;
122 return ELF::R_VE_GOT_LO32;
124 return ELF::R_VE_GOTOFF_HI32;
126 return ELF::R_VE_GOTOFF_LO32;
128 return ELF::R_VE_PLT_HI32;
130 return ELF::R_VE_PLT_LO32;
132 return ELF::R_VE_TLS_GD_HI32;
134 return ELF::R_VE_TLS_GD_LO32;
136 return ELF::R_VE_TPOFF_HI32;
138 return ELF::R_VE_TPOFF_LO32;
141 return ELF::R_VE_NONE;
144bool VEELFObjectWriter::needsRelocateWithSymbol(
const MCValue &,
145 unsigned Type)
const {
154 case ELF::R_VE_GOT_HI32:
155 case ELF::R_VE_GOT_LO32:
156 case ELF::R_VE_GOTOFF_HI32:
157 case ELF::R_VE_GOTOFF_LO32:
158 case ELF::R_VE_TLS_GD_HI32:
159 case ELF::R_VE_TLS_GD_LO32:
164std::unique_ptr<MCObjectTargetWriter>
166 return std::make_unique<VEELFObjectWriter>(OSABI);
static Error reportError(StringRef Message)
PowerPC TLS Dynamic Call Fixup
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Target - Wrapper for Target specific information.
@ 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.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
@ 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 > createVEELFObjectWriter(uint8_t OSABI)