10 #ifndef LLVM_MC_MCELFOBJECTWRITER_H 11 #define LLVM_MC_MCELFOBJECTWRITER_H 42 uint64_t OriginalAddend)
43 : Offset(Offset), Symbol(Symbol), Type(Type), Addend(Addend),
44 OriginalSymbol(OriginalSymbol), OriginalAddend(OriginalAddend) {}
47 Out <<
"Off=" << Offset <<
", Sym=" << Symbol <<
", Type=" << Type
48 <<
", Addend=" << Addend <<
", OriginalSymbol=" << OriginalSymbol
57 const uint16_t EMachine;
58 const unsigned HasRelocationAddend : 1;
59 const unsigned Is64Bit : 1;
63 bool HasRelocationAddend);
90 virtual bool needsRelocateWithSymbol(
const MCSymbol &Sym,
94 std::vector<ELFRelocationEntry> &Relocs);
108 #define R_TYPE_SHIFT 0 109 #define R_TYPE_MASK 0xffffff00 110 #define R_TYPE2_SHIFT 8 111 #define R_TYPE2_MASK 0xffff00ff 112 #define R_TYPE3_SHIFT 16 113 #define R_TYPE3_MASK 0xff00ffff 114 #define R_SSYM_SHIFT 24 115 #define R_SSYM_MASK 0x00ffffff 151 std::unique_ptr<MCObjectWriter>
155 std::unique_ptr<MCObjectWriter>
158 bool IsLittleEndian);
162 #endif // LLVM_MC_MCELFOBJECTWRITER_H
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
This class represents lattice values for constants.
uint8_t getRType2(uint32_t Type) const
This represents an "assembler immediate".
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
unsigned setRSsym(unsigned Value, unsigned Type) const
virtual Triple::ObjectFormatType getFormat() const
uint8_t getRType3(uint32_t Type) const
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
virtual Triple::ObjectFormatType getFormat() const =0
static uint8_t getOSABI(Triple::OSType OSType)
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.
std::unique_ptr< MCObjectWriter > createELFObjectWriter(std::unique_ptr< MCELFObjectTargetWriter > MOTW, raw_pwrite_stream &OS, bool IsLittleEndian)
Construct a new ELF writer instance.
unsigned setRType(unsigned Value, unsigned Type) const
unsigned setRType2(unsigned Value, unsigned Type) const
The instances of the Type class are immutable: once they are created, they are never changed...
uint8_t getRSsym(uint32_t Type) const
unsigned setRType3(unsigned Value, unsigned Type) const
PowerPC TLS Dynamic Call Fixup
ELFRelocationEntry(uint64_t Offset, const MCSymbolELF *Symbol, unsigned Type, uint64_t Addend, const MCSymbolELF *OriginalSymbol, uint64_t OriginalAddend)
std::unique_ptr< MCObjectWriter > createELFDwoObjectWriter(std::unique_ptr< MCELFObjectTargetWriter > MOTW, raw_pwrite_stream &OS, raw_pwrite_stream &DwoOS, bool IsLittleEndian)
uint16_t getEMachine() const
bool hasRelocationAddend() const
Target - Wrapper for Target specific information.
static bool classof(const MCObjectTargetWriter *W)
void print(raw_ostream &Out) const
This represents a section on linux, lots of unix variants and some bare metal systems.
Base class for classes that define behaviour that is specific to both the target and the object forma...
An abstract base class for streams implementations that also support a pwrite operation.
const MCSymbolELF * OriginalSymbol
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream...
const MCSymbolELF * Symbol
uint8_t getRType(uint32_t Type) const