class SymbolRef

Declaration

class SymbolRef : public BasicSymbolRef { /* full declaration omitted */ };

Description

This is a value type class that represents a single symbol in the list of symbols in the object file.

Declared at: llvm/include/llvm/Object/ObjectFile.h:167

Inherits from: BasicSymbolRef

Member Variables

Method Overview

  • public SymbolRef()
  • public SymbolRef(llvm::object::DataRefImpl SymbolP, const llvm::object::ObjectFile * Owner)
  • public SymbolRef(const llvm::object::BasicSymbolRef & B)
  • public Expected<uint64_t> getAddress() const
  • public uint32_t getAlignment() const
  • public uint64_t getCommonSize() const
  • public Expected<llvm::StringRef> getName() const
  • public const llvm::object::ObjectFile * getObject() const
  • public Expected<llvm::object::section_iterator> getSection() const
  • public Expected<SymbolRef::Type> getType() const
  • public Expected<uint64_t> getValue() const

Inherited from BasicSymbolRef:

Methods

SymbolRef()

Declared at: llvm/include/llvm/Object/ObjectFile.h:180

SymbolRef(llvm::object::DataRefImpl SymbolP,
          const llvm::object::ObjectFile* Owner)

Declared at: llvm/include/llvm/Object/ObjectFile.h:181

Parameters

llvm::object::DataRefImpl SymbolP
const llvm::object::ObjectFile* Owner

SymbolRef(const llvm::object::BasicSymbolRef& B)

Declared at: llvm/include/llvm/Object/ObjectFile.h:182

Parameters

const llvm::object::BasicSymbolRef& B

Expected<uint64_t> getAddress() const

Description

Returns the symbol virtual address (i.e. address at which it will be mapped).

Declared at: llvm/include/llvm/Object/ObjectFile.h:189

uint32_t getAlignment() const

Description

Get the alignment of this symbol as the actual value (not log 2).

Declared at: llvm/include/llvm/Object/ObjectFile.h:196

uint64_t getCommonSize() const

Declared at: llvm/include/llvm/Object/ObjectFile.h:197

Expected<llvm::StringRef> getName() const

Declared at: llvm/include/llvm/Object/ObjectFile.h:186

const llvm::object::ObjectFile* getObject() const

Declared at: llvm/include/llvm/Object/ObjectFile.h:204

Expected<llvm::object::section_iterator>
getSection() const

Description

Get section this symbol is defined in reference to. Result is end_sections() if it is undefined or is an absolute symbol.

Declared at: llvm/include/llvm/Object/ObjectFile.h:202

Expected<SymbolRef::Type> getType() const

Declared at: llvm/include/llvm/Object/ObjectFile.h:198

Expected<uint64_t> getValue() const

Description

Return the value of the symbol depending on the object this can be an offset or a virtual address.

Declared at: llvm/include/llvm/Object/ObjectFile.h:193