22 explicit LanaiELFObjectWriter(uint8_t OSABI);
24 ~LanaiELFObjectWriter()
override =
default;
28 const MCFixup &Fixup,
bool IsPCRel)
const override;
29 bool needsRelocateWithSymbol(
const MCSymbol &SD,
30 unsigned Type)
const override;
35 LanaiELFObjectWriter::LanaiELFObjectWriter(uint8_t OSABI)
44 unsigned Kind =
static_cast<unsigned>(Fixup.
getKind());
47 Type = ELF::R_LANAI_21;
50 Type = ELF::R_LANAI_21_F;
53 Type = ELF::R_LANAI_25;
57 Type = ELF::R_LANAI_32;
60 Type = ELF::R_LANAI_HI16;
63 Type = ELF::R_LANAI_LO16;
66 Type = ELF::R_LANAI_NONE;
75 bool LanaiELFObjectWriter::needsRelocateWithSymbol(
const MCSymbol & ,
76 unsigned Type)
const {
79 case ELF::R_LANAI_21_F:
82 case ELF::R_LANAI_HI16:
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...
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.
MCObjectWriter * createLanaiELFObjectWriter(raw_pwrite_stream &OS, uint8_t OSABI)
Function Alias Analysis false
The instances of the Type class are immutable: once they are created, they are never changed...
MCFixupKind getKind() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
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.