25 WebAssemblyELFObjectWriter(
bool Is64Bit, uint8_t OSABI);
29 const MCFixup &Fixup,
bool IsPCRel)
const override;
33 WebAssemblyELFObjectWriter::WebAssemblyELFObjectWriter(
bool Is64Bit,
45 dyn_cast<MCSymbolRefExpr>(Fixup.
getValue()))
46 if (SyExp->getKind() == MCSymbolRefExpr::VK_WebAssembly_FUNCTION)
47 return ELF::R_WEBASSEMBLY_FUNCTION;
51 assert(!
is64Bit() &&
"4-byte relocations only supported on wasm32");
52 return ELF::R_WEBASSEMBLY_DATA;
54 assert(
is64Bit() &&
"8-byte relocations only supported on wasm64");
55 return ELF::R_WEBASSEMBLY_DATA;
65 new WebAssemblyELFObjectWriter(Is64Bit, OSABI);
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)...
Represent a reference to a symbol from inside an expression.
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.
Function Alias Analysis false
const MCExpr * getValue() const
static bool is64Bit(const char *name)
This file provides WebAssembly-specific target descriptions.
MCFixupKind getKind() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
PowerPC TLS Dynamic Call Fixup
MCObjectWriter * createWebAssemblyELFObjectWriter(raw_pwrite_stream &OS, bool Is64Bit, uint8_t OSABI)
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.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())