21 AMDGPUELFObjectWriter(
bool Is64Bit,
bool HasRelocationAddend);
24 const MCFixup &Fixup,
bool IsPCRel)
const override;
30 AMDGPUELFObjectWriter::AMDGPUELFObjectWriter(
bool Is64Bit,
31 bool HasRelocationAddend)
35 HasRelocationAddend) { }
41 if (
const auto *SymA = Target.
getSymA()) {
44 if (SymA->getSymbol().getName() ==
"SCRATCH_RSRC_DWORD0")
45 return ELF::R_AMDGPU_ABS32_LO;
47 if (SymA->getSymbol().getName() ==
"SCRATCH_RSRC_DWORD1")
48 return ELF::R_AMDGPU_ABS32_HI;
55 return ELF::R_AMDGPU_GOTPCREL;
57 return ELF::R_AMDGPU_GOTPCREL32_LO;
59 return ELF::R_AMDGPU_GOTPCREL32_HI;
61 return ELF::R_AMDGPU_REL32_LO;
63 return ELF::R_AMDGPU_REL32_HI;
69 return ELF::R_AMDGPU_REL32;
72 return ELF::R_AMDGPU_ABS32;
74 return ELF::R_AMDGPU_ABS64;
82 bool HasRelocationAddend,
85 new AMDGPUELFObjectWriter(Is64Bit, HasRelocationAddend);
This represents an "assembler immediate".
Defines the object file and target independent interfaces used by the assembler backend to write nati...
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
static unsigned getRelocType(const MCValue &Target, const MCFixupKind FixupKind, const bool IsPCRel)
Translates generic PPC fixup kind to Mach-O/PPC relocation type enum.
A four-byte section relative fixup.
Context object for machine code objects.
MCObjectWriter * createAMDGPUELFObjectWriter(bool Is64Bit, bool HasRelocationAddend, raw_pwrite_stream &OS)
MCSymbolRefExpr::VariantKind getAccessVariant() const
MCFixupKind getKind() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
const MCSymbolRefExpr * getSymA() const
A four-byte pc relative fixup.
Target - Wrapper for Target specific information.
Provides AMDGPU specific target descriptions.
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.