LLVM 19.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::objcopy::elf::SectionBase Class Referenceabstract

#include "ObjCopy/ELF/ELFObject.h"

Inheritance diagram for llvm::objcopy::elf::SectionBase:
Inheritance graph
[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 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_t > OriginalData
 
bool HasSymbol = false
 

Detailed Description

Definition at line 509 of file ELFObject.h.

Constructor & Destructor Documentation

◆ SectionBase() [1/2]

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

◆ SectionBase() [2/2]

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

◆ ~SectionBase()

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

Member Function Documentation

◆ accept() [1/2]

virtual Error llvm::objcopy::elf::SectionBase::accept ( MutableSectionVisitor Visitor)
pure virtual

◆ accept() [2/2]

virtual Error llvm::objcopy::elf::SectionBase::accept ( SectionVisitor Visitor) const
pure virtual

◆ finalize()

void SectionBase::finalize ( )
virtual

◆ hasContents()

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

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

Definition at line 551 of file ELFObject.h.

◆ initialize()

Error SectionBase::initialize ( SectionTableRef  SecTable)
virtual

◆ markSymbols()

void SectionBase::markSymbols ( )
virtual

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

Definition at line 63 of file ELFObject.cpp.

◆ onRemove()

void SectionBase::onRemove ( )
virtual

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

Definition at line 66 of file ELFObject.cpp.

◆ removeSectionReferences()

Error SectionBase::removeSectionReferences ( bool  AllowBrokenLinks,
function_ref< bool(const SectionBase *)>  ToRemove 
)
virtual

◆ 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 555 of file ELFObject.h.

Member Data Documentation

◆ Addr

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

◆ Align

uint64_t llvm::objcopy::elf::SectionBase::Align = 1

◆ EntrySize

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

◆ Flags

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

◆ 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

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

◆ Info

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

◆ Link

uint64_t llvm::objcopy::elf::SectionBase::Link = ELF::SHN_UNDEF

◆ Name

std::string llvm::objcopy::elf::SectionBase::Name

◆ NameIndex

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

Definition at line 527 of file ELFObject.h.

◆ Offset

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

◆ OriginalData

ArrayRef<uint8_t> llvm::objcopy::elf::SectionBase::OriginalData

◆ OriginalFlags

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

◆ OriginalIndex

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

Definition at line 516 of file ELFObject.h.

◆ OriginalOffset

uint64_t llvm::objcopy::elf::SectionBase::OriginalOffset = std::numeric_limits<uint64_t>::max()

◆ OriginalType

uint64_t llvm::objcopy::elf::SectionBase::OriginalType = ELF::SHT_NULL

◆ 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

uint64_t llvm::objcopy::elf::SectionBase::Type = ELF::SHT_NULL

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