26 enum { DefaultEABIVersion = 0x05000000U };
33 ARMELFObjectWriter(uint8_t OSABI);
35 ~ARMELFObjectWriter()
override;
38 bool IsPCRel)
const override;
40 bool needsRelocateWithSymbol(
const MCSymbol &Sym,
41 unsigned Type)
const override;
45 ARMELFObjectWriter::ARMELFObjectWriter(uint8_t OSABI)
50 ARMELFObjectWriter::~ARMELFObjectWriter() {}
52 bool ARMELFObjectWriter::needsRelocateWithSymbol(
const MCSymbol &Sym,
53 unsigned Type)
const {
61 case ELF::R_ARM_PREL31:
62 case ELF::R_ARM_ABS32:
70 unsigned ARMELFObjectWriter::GetRelocType(
const MCValue &
Target,
73 return GetRelocTypeInner(Target, Fixup, IsPCRel);
76 unsigned ARMELFObjectWriter::GetRelocTypeInner(
const MCValue &
Target,
83 switch ((
unsigned)Fixup.
getKind()) {
86 return ELF::R_ARM_NONE;
91 Type = ELF::R_ARM_REL32;
96 Type = ELF::R_ARM_TLS_IE32;
99 Type = ELF::R_ARM_GOT_PREL;
107 Type = ELF::R_ARM_CALL;
110 Type = ELF::R_ARM_TLS_CALL;
113 Type = ELF::R_ARM_CALL;
120 Type = ELF::R_ARM_JUMP24;
124 Type = ELF::R_ARM_THM_JUMP24;
127 Type = ELF::R_ARM_MOVT_PREL;
130 Type = ELF::R_ARM_MOVW_PREL_NC;
133 Type = ELF::R_ARM_THM_MOVT_PREL;
136 Type = ELF::R_ARM_THM_MOVW_PREL_NC;
142 Type = ELF::R_ARM_THM_TLS_CALL;
145 Type = ELF::R_ARM_THM_CALL;
151 switch ((
unsigned)Fixup.
getKind()) {
154 return ELF::R_ARM_NONE;
159 Type = ELF::R_ARM_ABS8;
167 Type = ELF::R_ARM_ABS16;
175 Type = ELF::R_ARM_NONE;
178 Type = ELF::R_ARM_GOT_BREL;
181 Type = ELF::R_ARM_TLS_GD32;
184 Type = ELF::R_ARM_TLS_LE32;
187 Type = ELF::R_ARM_TLS_IE32;
190 Type = ELF::R_ARM_ABS32;
193 Type = ELF::R_ARM_GOTOFF32;
196 Type = ELF::R_ARM_GOT_PREL;
199 Type = ELF::R_ARM_TARGET1;
202 Type = ELF::R_ARM_TARGET2;
205 Type = ELF::R_ARM_PREL31;
208 Type = ELF::R_ARM_SBREL32;
211 Type = ELF::R_ARM_TLS_LDO32;
214 Type = ELF::R_ARM_TLS_CALL;
217 Type = ELF::R_ARM_TLS_GOTDESC;
220 Type = ELF::R_ARM_TLS_DESCSEQ;
234 Type = ELF::R_ARM_JUMP24;
237 Type = ELF::R_ARM_MOVT_ABS;
240 Type = ELF::R_ARM_MOVW_ABS_NC;
243 Type = ELF::R_ARM_THM_MOVT_ABS;
246 Type = ELF::R_ARM_THM_MOVW_ABS_NC;
256 bool IsLittleEndian) {
This represents an "assembler immediate".
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Defines the object file and target independent interfaces used by the assembler backend to write nati...
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const char *reason, bool gen_crash_diag=true)
Reports a serious error, calling any installed error handler.
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
MCObjectWriter * createARMELFObjectWriter(raw_pwrite_stream &OS, uint8_t OSABI, bool IsLittleEndian)
Construct an ELF Mach-O object writer.
The instances of the Type class are immutable: once they are created, they are never changed...
MCSymbolRefExpr::VariantKind getAccessVariant() const
MCFixupKind getKind() const
PowerPC TLS Dynamic Call Fixup
Target - Wrapper for Target specific information.
MCObjectWriter * createELFObjectWriter(MCELFObjectTargetWriter *MOTW, raw_pwrite_stream &OS, bool IsLittleEndian)
Construct a new ELF writer instance.
An abstract base class for streams implementations that also support a pwrite operation.