LLVM 22.0.0git
llvm::objcopy::elf::SectionBase Class Referenceabstract

#include "ObjCopy/ELF/ELFObject.h"

Inheritance diagram for llvm::objcopy::elf::SectionBase:
[legend]

Public Member Functions

 SectionBase ()=default
 SectionBase (const SectionBase &)=default
virtual ~SectionBase ()=default
virtual Error initialize (SectionTableRef SecTable)
virtual void finalize ()
virtual Error removeSectionReferences (bool AllowBrokenLinks, function_ref< bool(const SectionBase *)> ToRemove)
virtual Error removeSymbols (function_ref< bool(const Symbol &)> ToRemove)
virtual Error accept (SectionVisitor &Visitor) const =0
virtual Error accept (MutableSectionVisitor &Visitor)=0
virtual void markSymbols ()
virtual void replaceSectionReferences (const DenseMap< SectionBase *, SectionBase * > &)
virtual bool hasContents () const
virtual ArrayRef< uint8_tgetContents () const
virtual void onRemove ()
virtual void restoreSymTabLink (SymbolTableSection &)

Public Attributes

std::string Name
SegmentParentSegment = nullptr
uint64_t HeaderOffset = 0
uint32_t Index = 0
uint32_t OriginalIndex = 0
uint64_t OriginalFlags = 0
uint64_t OriginalType = ELF::SHT_NULL
uint64_t OriginalOffset = std::numeric_limits<uint64_t>::max()
uint64_t Addr = 0
uint64_t Align = 1
uint32_t EntrySize = 0
uint64_t Flags = 0
uint64_t Info = 0
uint64_t Link = ELF::SHN_UNDEF
uint64_t NameIndex = 0
uint64_t Offset = 0
uint64_t Size = 0
uint64_t Type = ELF::SHT_NULL
ArrayRef< uint8_tOriginalData
bool HasSymbol = false

Detailed Description

Definition at line 509 of file ELFObject.h.

Constructor & Destructor Documentation

◆ SectionBase() [1/2]

◆ SectionBase() [2/2]

llvm::objcopy::elf::SectionBase::SectionBase ( const SectionBase & )
default

References SectionBase().

◆ ~SectionBase()

virtual llvm::objcopy::elf::SectionBase::~SectionBase ( )
virtualdefault

References SectionBase(), and ToRemove.

Member Function Documentation

◆ accept() [1/2]

◆ accept() [2/2]

◆ finalize()

◆ getContents()

virtual ArrayRef< uint8_t > llvm::objcopy::elf::SectionBase::getContents ( ) const
inlinevirtual

Reimplemented in llvm::objcopy::elf::OwnedDataSection, and llvm::objcopy::elf::Section.

Definition at line 552 of file ELFObject.h.

◆ hasContents()

virtual bool llvm::objcopy::elf::SectionBase::hasContents ( ) const
inlinevirtual

Reimplemented in llvm::objcopy::elf::OwnedDataSection, and llvm::objcopy::elf::Section.

Definition at line 551 of file ELFObject.h.

◆ initialize()

◆ markSymbols()

void SectionBase::markSymbols ( )
virtual

Reimplemented in llvm::objcopy::elf::GroupSection, and llvm::objcopy::elf::RelocationSection.

Definition at line 61 of file ELFObject.cpp.

◆ onRemove()

void SectionBase::onRemove ( )
virtual

Reimplemented in llvm::objcopy::elf::GroupSection.

Definition at line 64 of file ELFObject.cpp.

◆ removeSectionReferences()

◆ removeSymbols()

Error SectionBase::removeSymbols ( function_ref< bool(const Symbol &)> ToRemove)
virtual

◆ replaceSectionReferences()

void SectionBase::replaceSectionReferences ( const DenseMap< SectionBase *, SectionBase * > & )
virtual

◆ restoreSymTabLink()

virtual void llvm::objcopy::elf::SectionBase::restoreSymTabLink ( SymbolTableSection & )
inlinevirtual

Reimplemented in llvm::objcopy::elf::Section.

Definition at line 556 of file ELFObject.h.

Member Data Documentation

◆ Addr

◆ Align

◆ EntrySize

◆ Flags

◆ HasSymbol

bool llvm::objcopy::elf::SectionBase::HasSymbol = false

◆ HeaderOffset

uint64_t llvm::objcopy::elf::SectionBase::HeaderOffset = 0

Definition at line 513 of file ELFObject.h.

◆ Index

◆ Info

◆ Link

◆ Name

◆ NameIndex

uint64_t llvm::objcopy::elf::SectionBase::NameIndex = 0

Definition at line 527 of file ELFObject.h.

◆ Offset

◆ OriginalData

◆ OriginalFlags

◆ OriginalIndex

uint32_t llvm::objcopy::elf::SectionBase::OriginalIndex = 0

Definition at line 516 of file ELFObject.h.

◆ OriginalOffset

◆ OriginalType

◆ ParentSegment

Segment* llvm::objcopy::elf::SectionBase::ParentSegment = nullptr

Definition at line 512 of file ELFObject.h.

Referenced by sectionPhysicalAddr().

◆ Size

uint64_t llvm::objcopy::elf::SectionBase::Size = 0

◆ Type


The documentation for this class was generated from the following files: