29 SystemZELFObjectWriter(
uint8_t OSABI);
30 ~SystemZELFObjectWriter()
override =
default;
40SystemZELFObjectWriter::SystemZELFObjectWriter(
uint8_t OSABI)
66 Ctx.
reportError(Loc,
"Unsupported absolute address");
76 return ELF::R_390_PC16;
80 return ELF::R_390_PC32;
82 return ELF::R_390_PC64;
84 return ELF::R_390_PC12DBL;
86 return ELF::R_390_PC16DBL;
88 return ELF::R_390_PC24DBL;
90 return ELF::R_390_PC32DBL;
92 Ctx.
reportError(Loc,
"Unsupported PC-relative address");
99 case FK_Data_4:
return ELF::R_390_TLS_LE32;
100 case FK_Data_8:
return ELF::R_390_TLS_LE64;
102 Ctx.
reportError(Loc,
"Unsupported thread-local address (local-exec)");
109 case FK_Data_4:
return ELF::R_390_TLS_LDO32;
110 case FK_Data_8:
return ELF::R_390_TLS_LDO64;
112 Ctx.
reportError(Loc,
"Unsupported thread-local address (local-dynamic)");
119 case FK_Data_4:
return ELF::R_390_TLS_LDM32;
120 case FK_Data_8:
return ELF::R_390_TLS_LDM64;
123 Ctx.
reportError(Loc,
"Unsupported thread-local address (local-dynamic)");
130 case FK_Data_4:
return ELF::R_390_TLS_GD32;
131 case FK_Data_8:
return ELF::R_390_TLS_GD64;
134 Ctx.
reportError(Loc,
"Unsupported thread-local address (general-dynamic)");
146 Ctx.
reportError(Loc,
"Unsupported PC-relative PLT address");
150unsigned SystemZELFObjectWriter::getRelocType(
MCContext &Ctx,
153 bool IsPCRel)
const {
166 assert(!IsPCRel &&
"NTPOFF shouldn't be PC-relative");
171 return ELF::R_390_TLS_IEENT;
172 Ctx.
reportError(Loc,
"Only PC-relative INDNTPOFF accesses are supported for now");
176 assert(!IsPCRel &&
"DTPOFF shouldn't be PC-relative");
180 assert(!IsPCRel &&
"TLSLDM shouldn't be PC-relative");
184 assert(!IsPCRel &&
"TLSGD shouldn't be PC-relative");
190 return ELF::R_390_GOTENT;
191 Ctx.
reportError(Loc,
"Only PC-relative GOT accesses are supported for now");
195 assert(IsPCRel &&
"@PLT shouldn't be PC-relative");
203std::unique_ptr<MCObjectTargetWriter>
205 return std::make_unique<SystemZELFObjectWriter>(OSABI);
PowerPC TLS Dynamic Call Fixup
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static unsigned getPLTReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind)
static unsigned getTLSGDReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind)
static unsigned getPCRelReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind)
static unsigned getTLSLDOReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind)
static unsigned getTLSLDMReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind)
static unsigned getAbsoluteReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind)
static unsigned getTLSLEReloc(MCContext &Ctx, SMLoc Loc, unsigned Kind)
Context object for machine code objects.
void reportError(SMLoc L, const Twine &Msg)
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)...
This represents an "assembler immediate".
Represents a location in source code.
Target - Wrapper for Target specific information.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
@ 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.
std::unique_ptr< MCObjectTargetWriter > createSystemZELFObjectWriter(uint8_t OSABI)