19 using namespace object;
20 using namespace MachO;
30 uint64_t RelType = Rel.
getType();
34 if (std::error_code EC = SymNameOrErr.
getError())
42 MCSymbol *Sym = Ctx.getOrCreateSymbol(SymName);
46 const MCExpr *Expr =
nullptr;
79 any_relocation_info RENext =
88 "X86_64_RELOC_SUBTRACTOR.");
93 uint64_t RSymAddr = RSymI->
getValue();
95 if (std::error_code EC = RSymName.
getError())
98 MCSymbol *RSym = Ctx.getOrCreateSymbol(*RSymName);
118 return new X86_64MachORelocationInfo(Ctx);
std::error_code getError() const
Represents either an error or a value T.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
const ObjectFile * getObject() const
unsigned getAnyRelocationType(const MachO::any_relocation_info &RE) const
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const char *reason, bool gen_crash_diag=true)
Reports a serious error, calling any installed error handler.
Base class for the full range of assembler expressions which are needed for parsing.
This is a value type class that represents a single relocation in the list of relocations in the obje...
Context object for machine code objects.
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
MachO::any_relocation_info getRelocation(DataRefImpl Rel) const
symbol_iterator getSymbol() const
unsigned getAnyRelocationPCRel(const MachO::any_relocation_info &RE) const
Create MCExprs from relocations found in an object file.
MCRelocationInfo * createX86_64MachORelocationInfo(MCContext &Ctx)
Construct X86-64 Mach-O relocation info.
void setVariableValue(const MCExpr *Value)
ErrorOr< StringRef > getName() const
bool isVariable() const
isVariable - Check if this is a variable symbol.
uint64_t getValue() const
Return the value of the symbol depending on the object this can be an offset or a virtual address...
StringRef - Represent a constant reference to a string, i.e.
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx)
DataRefImpl getRawDataRefImpl() const