26 AMDGPUELFObjectWriter(
bool Is64Bit, uint8_t OSABI,
bool HasRelocationAddend);
30 const MCFixup &Fixup,
bool IsPCRel)
const override;
36 AMDGPUELFObjectWriter::AMDGPUELFObjectWriter(
bool Is64Bit,
38 bool HasRelocationAddend)
40 HasRelocationAddend) {}
46 if (
const auto *SymA = Target.
getSymA()) {
49 if (SymA->getSymbol().getName() ==
"SCRATCH_RSRC_DWORD0" ||
50 SymA->getSymbol().getName() ==
"SCRATCH_RSRC_DWORD1")
51 return ELF::R_AMDGPU_ABS32_LO;
58 return ELF::R_AMDGPU_GOTPCREL;
60 return ELF::R_AMDGPU_GOTPCREL32_LO;
62 return ELF::R_AMDGPU_GOTPCREL32_HI;
64 return ELF::R_AMDGPU_REL32_LO;
66 return ELF::R_AMDGPU_REL32_HI;
68 return ELF::R_AMDGPU_REL64;
74 return ELF::R_AMDGPU_REL32;
77 return ELF::R_AMDGPU_ABS32;
79 return ELF::R_AMDGPU_ABS64;
85 std::unique_ptr<MCObjectTargetWriter>
87 bool HasRelocationAddend) {
88 return llvm::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)...
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.
std::unique_ptr< MCObjectTargetWriter > createAMDGPUELFObjectWriter(bool Is64Bit, uint8_t OSABI, bool HasRelocationAddend)
MCFixupKind getKind() const