25 AMDGPUELFObjectWriter(
bool Is64Bit, uint8_t OSABI,
bool HasRelocationAddend,
30 const MCFixup &Fixup,
bool IsPCRel)
const override;
36 AMDGPUELFObjectWriter::AMDGPUELFObjectWriter(
bool Is64Bit,
38 bool HasRelocationAddend,
41 HasRelocationAddend, ABIVersion) {}
47 if (
const auto *SymA = Target.
getSymA()) {
50 if (SymA->getSymbol().getName() ==
"SCRATCH_RSRC_DWORD0" ||
51 SymA->getSymbol().getName() ==
"SCRATCH_RSRC_DWORD1")
52 return ELF::R_AMDGPU_ABS32_LO;
59 return ELF::R_AMDGPU_GOTPCREL;
61 return ELF::R_AMDGPU_GOTPCREL32_LO;
63 return ELF::R_AMDGPU_GOTPCREL32_HI;
65 return ELF::R_AMDGPU_REL32_LO;
67 return ELF::R_AMDGPU_REL32_HI;
69 return ELF::R_AMDGPU_REL64;
75 return ELF::R_AMDGPU_REL32;
78 return ELF::R_AMDGPU_ABS32;
80 return ELF::R_AMDGPU_ABS64;
86 std::unique_ptr<MCObjectTargetWriter>
88 bool HasRelocationAddend,
90 return std::make_unique<AMDGPUELFObjectWriter>(Is64Bit, OSABI,
This class represents lattice values for constants.
This represents an "assembler immediate".
MCSymbolRefExpr::VariantKind getAccessVariant() const
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
std::unique_ptr< MCObjectTargetWriter > createAMDGPUELFObjectWriter(bool Is64Bit, uint8_t OSABI, bool HasRelocationAddend, uint8_t ABIVersion)
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.
const MCSymbolRefExpr * getSymA() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
A four-byte pc relative fixup.
Target - Wrapper for Target specific information.
Provides AMDGPU specific target descriptions.
MCFixupKind getKind() const