23 explicit LanaiELFObjectWriter(uint8_t OSABI);
25 ~LanaiELFObjectWriter()
override =
default;
29 const MCFixup &Fixup,
bool IsPCRel)
const override;
30 bool needsRelocateWithSymbol(
const MCSymbol &SD,
31 unsigned Type)
const override;
36 LanaiELFObjectWriter::LanaiELFObjectWriter(uint8_t OSABI)
45 unsigned Kind =
static_cast<unsigned>(Fixup.
getKind());
48 Type = ELF::R_LANAI_21;
51 Type = ELF::R_LANAI_21_F;
54 Type = ELF::R_LANAI_25;
58 Type = ELF::R_LANAI_32;
61 Type = ELF::R_LANAI_HI16;
64 Type = ELF::R_LANAI_LO16;
67 Type = ELF::R_LANAI_NONE;
76 bool LanaiELFObjectWriter::needsRelocateWithSymbol(
const MCSymbol & ,
77 unsigned Type)
const {
80 case ELF::R_LANAI_21_F:
83 case ELF::R_LANAI_HI16:
90 std::unique_ptr<MCObjectTargetWriter>
92 return llvm::make_unique<LanaiELFObjectWriter>(OSABI);
This class represents lattice values for constants.
This represents an "assembler immediate".
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
block Block Frequency true
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.
Context object for machine code objects.
The instances of the Type class are immutable: once they are created, they are never changed...
std::unique_ptr< MCObjectTargetWriter > createLanaiELFObjectWriter(uint8_t OSABI)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Target - Wrapper for Target specific information.
MCFixupKind getKind() const