class SymbolTableSection

Declaration

class SymbolTableSection : public SectionBase { /* full declaration omitted */ };

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:681

Inherits from: SectionBase

Member Variables

protected std::vector<std::unique_ptr<Symbol>> Symbols
protected llvm::objcopy::elf::StringTableSection* SymbolNames = nullptr
protected llvm::objcopy::elf::SectionIndexSection* SectionIndexTable = nullptr

Inherited from SectionBase:

public Name
public ParentSegment = nullptr
public HeaderOffset = 0
public Index = 0
public OriginalIndex = 0
public OriginalFlags = 0
public OriginalType = ELF::SHT_NULL
public OriginalOffset = std::numeric_limits<unsigned long>::max()
public Addr = 0
public Align = 1
public EntrySize = 0
public Flags = 0
public Info = 0
public Link = ELF::SHN_UNDEF
public NameIndex = 0
public Offset = 0
public Size = 0
public Type = ELF::SHT_NULL
public OriginalData
public HasSymbol = false

Method Overview

  • public SymbolTableSection()
  • public llvm::Error accept(llvm::objcopy::elf::MutableSectionVisitor & Visitor)
  • public llvm::Error accept(llvm::objcopy::elf::SectionVisitor & Visitor) const
  • public void addSymbol(llvm::Twine Name, uint8_t Bind, uint8_t Type, llvm::objcopy::elf::SectionBase * DefinedIn, uint64_t Value, uint8_t Visibility, uint16_t Shndx, uint64_t SymbolSize)
  • private void assignIndices()
  • public static bool classof(const llvm::objcopy::elf::SectionBase * S)
  • public bool empty() const
  • public void fillShndxTable()
  • public void finalize()
  • public const llvm::objcopy::elf::SectionIndexSection * getShndxTable() const
  • public const llvm::objcopy::elf::SectionBase * getStrTab() const
  • public Expected<const llvm::objcopy::elf::Symbol *> getSymbolByIndex(uint32_t Index) const
  • public Expected<llvm::objcopy::elf::Symbol *> getSymbolByIndex(uint32_t Index)
  • public llvm::Error initialize(llvm::objcopy::elf::SectionTableRef SecTable)
  • public void prepareForLayout()
  • public llvm::Error removeSectionReferences(bool AllowBrokenLinks, function_ref<bool (const llvm::objcopy::elf::SectionBase *)> ToRemove)
  • public llvm::Error removeSymbols(function_ref<bool (const llvm::objcopy::elf::Symbol &)> ToRemove)
  • public void replaceSectionReferences(const DenseMap<llvm::objcopy::elf::SectionBase *, llvm::objcopy::elf::SectionBase *> & FromTo)
  • public void setShndxTable(llvm::objcopy::elf::SectionIndexSection * ShndxTable)
  • private void setStrTab(llvm::objcopy::elf::StringTableSection * StrTab)
  • public void updateSymbols(function_ref<void (llvm::objcopy::elf::Symbol &)> Callable)

Inherited from SectionBase:

Methods

SymbolTableSection()

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:695

llvm::Error accept(
    llvm::objcopy::elf::MutableSectionVisitor&
        Visitor)

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:719

Parameters

llvm::objcopy::elf::MutableSectionVisitor& Visitor

llvm::Error accept(
    llvm::objcopy::elf::SectionVisitor& Visitor)
    const

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:718

Parameters

llvm::objcopy::elf::SectionVisitor& Visitor

void addSymbol(
    llvm::Twine Name,
    uint8_t Bind,
    uint8_t Type,
    llvm::objcopy::elf::SectionBase* DefinedIn,
    uint64_t Value,
    uint8_t Visibility,
    uint16_t Shndx,
    uint64_t SymbolSize)

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:697

Parameters

llvm::Twine Name
uint8_t Bind
uint8_t Type
llvm::objcopy::elf::SectionBase* DefinedIn
uint64_t Value
uint8_t Visibility
uint16_t Shndx
uint64_t SymbolSize

void assignIndices()

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:685

static bool classof(
    const llvm::objcopy::elf::SectionBase* S)

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:724

Parameters

const llvm::objcopy::elf::SectionBase* S

bool empty() const

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:702

void fillShndxTable()

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:707

void finalize()

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:717

const llvm::objcopy::elf::SectionIndexSection*
getShndxTable() const

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:706

const llvm::objcopy::elf::SectionBase* getStrTab()
    const

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:708

Expected<const llvm::objcopy::elf::Symbol*>
getSymbolByIndex(uint32_t Index) const

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:709

Parameters

uint32_t Index

Expected<llvm::objcopy::elf::Symbol*>
getSymbolByIndex(uint32_t Index)

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:710

Parameters

uint32_t Index

llvm::Error initialize(
    llvm::objcopy::elf::SectionTableRef SecTable)

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:716

Parameters

llvm::objcopy::elf::SectionTableRef SecTable

void prepareForLayout()

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:700

llvm::Error removeSectionReferences(
    bool AllowBrokenLinks,
    function_ref<bool(
        const llvm::objcopy::elf::SectionBase*)>
        ToRemove)

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:713

Parameters

bool AllowBrokenLinks
function_ref<bool( const llvm::objcopy::elf::SectionBase*)> ToRemove

llvm::Error removeSymbols(
    function_ref<
        bool(const llvm::objcopy::elf::Symbol&)>
        ToRemove)

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:720

Parameters

function_ref<bool( const llvm::objcopy::elf::Symbol&)> ToRemove

void replaceSectionReferences(
    const DenseMap<
        llvm::objcopy::elf::SectionBase*,
        llvm::objcopy::elf::SectionBase*>& FromTo)

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:721

Parameters

const DenseMap<llvm::objcopy::elf::SectionBase*, llvm::objcopy::elf::SectionBase*>& FromTo

void setShndxTable(
    llvm::objcopy::elf::SectionIndexSection*
        ShndxTable)

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:703

Parameters

llvm::objcopy::elf::SectionIndexSection* ShndxTable

void setStrTab(
    llvm::objcopy::elf::StringTableSection*
        StrTab)

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:684

Parameters

llvm::objcopy::elf::StringTableSection* StrTab

void updateSymbols(
    function_ref<void(
        llvm::objcopy::elf::Symbol&)> Callable)

Declared at: llvm/lib/ObjCopy/ELF/ELFObject.h:711

Parameters

function_ref<void(llvm::objcopy::elf::Symbol&)> Callable