LLVM 20.0.0git
|
#include "ObjCopy/ELF/ELFObject.h"
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 |
Segment * | ParentSegment = 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 |
Definition at line 509 of file ELFObject.h.
|
default |
|
default |
|
virtualdefault |
|
pure virtual |
Implemented in llvm::objcopy::elf::Section, llvm::objcopy::elf::OwnedDataSection, llvm::objcopy::elf::CompressedSection, llvm::objcopy::elf::DecompressedSection, llvm::objcopy::elf::StringTableSection, llvm::objcopy::elf::SectionIndexSection, llvm::objcopy::elf::SymbolTableSection, llvm::objcopy::elf::RelocationSection, llvm::objcopy::elf::GroupSection, llvm::objcopy::elf::DynamicRelocationSection, and llvm::objcopy::elf::GnuDebugLinkSection.
|
pure virtual |
Implemented in llvm::objcopy::elf::GroupSection, llvm::objcopy::elf::DynamicRelocationSection, llvm::objcopy::elf::OwnedDataSection, llvm::objcopy::elf::Section, llvm::objcopy::elf::CompressedSection, llvm::objcopy::elf::DecompressedSection, llvm::objcopy::elf::StringTableSection, llvm::objcopy::elf::SectionIndexSection, llvm::objcopy::elf::SymbolTableSection, llvm::objcopy::elf::RelocationSection, and llvm::objcopy::elf::GnuDebugLinkSection.
Referenced by llvm::objcopy::elf::BinaryWriter::write().
|
virtual |
Reimplemented in llvm::objcopy::elf::Section, llvm::objcopy::elf::SectionIndexSection, llvm::objcopy::elf::SymbolTableSection, llvm::objcopy::elf::RelocSectionWithSymtabBase< SymTabType >, llvm::objcopy::elf::RelocSectionWithSymtabBase< DynamicSymbolTableSection >, llvm::objcopy::elf::RelocSectionWithSymtabBase< SymbolTableSection >, and llvm::objcopy::elf::GroupSection.
Definition at line 63 of file ELFObject.cpp.
|
inlinevirtual |
Reimplemented in llvm::objcopy::elf::Section, and llvm::objcopy::elf::OwnedDataSection.
Definition at line 551 of file ELFObject.h.
|
virtual |
Reimplemented in llvm::objcopy::elf::Section, llvm::objcopy::elf::SectionIndexSection, llvm::objcopy::elf::SymbolTableSection, llvm::objcopy::elf::RelocSectionWithSymtabBase< SymTabType >, llvm::objcopy::elf::RelocSectionWithSymtabBase< DynamicSymbolTableSection >, and llvm::objcopy::elf::RelocSectionWithSymtabBase< SymbolTableSection >.
Definition at line 62 of file ELFObject.cpp.
References llvm::Error::success().
|
virtual |
Reimplemented in llvm::objcopy::elf::RelocationSection, and llvm::objcopy::elf::GroupSection.
Definition at line 64 of file ELFObject.cpp.
|
virtual |
Reimplemented in llvm::objcopy::elf::GroupSection.
Definition at line 67 of file ELFObject.cpp.
|
virtual |
Reimplemented in llvm::objcopy::elf::Section, llvm::objcopy::elf::SymbolTableSection, llvm::objcopy::elf::RelocationSection, llvm::objcopy::elf::GroupSection, and llvm::objcopy::elf::DynamicRelocationSection.
Definition at line 53 of file ELFObject.cpp.
References llvm::Error::success().
|
virtual |
Reimplemented in llvm::objcopy::elf::SymbolTableSection, llvm::objcopy::elf::RelocationSection, and llvm::objcopy::elf::GroupSection.
Definition at line 58 of file ELFObject.cpp.
References llvm::Error::success().
|
virtual |
Reimplemented in llvm::objcopy::elf::SymbolTableSection, llvm::objcopy::elf::RelocationSection, and llvm::objcopy::elf::GroupSection.
Definition at line 65 of file ELFObject.cpp.
|
inlinevirtual |
Reimplemented in llvm::objcopy::elf::Section.
Definition at line 555 of file ELFObject.h.
uint64_t llvm::objcopy::elf::SectionBase::Addr = 0 |
Definition at line 521 of file ELFObject.h.
Referenced by addSymbol(), llvm::objcopy::elf::ASCIIHexWriter::checkSection(), llvm::objcopy::elf::OwnedDataSection::OwnedDataSection(), sectionPhysicalAddr(), and sectionWithinSegment().
uint64_t llvm::objcopy::elf::SectionBase::Align = 1 |
Definition at line 522 of file ELFObject.h.
Referenced by setSectionType(), and llvm::objcopy::elf::ELFSectionSizer< ELFT >::visit().
uint32_t llvm::objcopy::elf::SectionBase::EntrySize = 0 |
uint64_t llvm::objcopy::elf::SectionBase::Flags = 0 |
Definition at line 524 of file ELFObject.h.
Referenced by llvm::objcopy::elf::CompressedSection::CompressedSection(), llvm::objcopy::elf::DecompressedSection::DecompressedSection(), handleArgs(), llvm::objcopy::elf::GroupSection::onRemove(), llvm::objcopy::elf::OwnedDataSection::OwnedDataSection(), sectionWithinSegment(), and setSectionFlagsAndType().
bool llvm::objcopy::elf::SectionBase::HasSymbol = false |
Definition at line 532 of file ELFObject.h.
Referenced by llvm::objcopy::elf::SymbolTableSection::addSymbol(), and llvm::objcopy::elf::ELFWriter< ELFT >::finalize().
uint64_t llvm::objcopy::elf::SectionBase::HeaderOffset = 0 |
Definition at line 513 of file ELFObject.h.
uint32_t llvm::objcopy::elf::SectionBase::Index = 0 |
Definition at line 514 of file ELFObject.h.
Referenced by llvm::objcopy::elf::Object::addNewSymbolTable(), llvm::objcopy::elf::BasicELFBuilder::addSymTab(), llvm::objcopy::elf::Section::finalize(), llvm::objcopy::elf::SectionIndexSection::finalize(), llvm::objcopy::elf::SymbolTableSection::finalize(), llvm::objcopy::elf::GroupSection::finalize(), llvm::objcopy::elf::Symbol::getShndx(), llvm::objcopy::elf::SymbolTableSection::getSymbolByIndex(), and llvm::objcopy::elf::ELFSectionWriter< ELFT >::visit().
uint64_t llvm::objcopy::elf::SectionBase::Info = 0 |
Definition at line 525 of file ELFObject.h.
Referenced by llvm::objcopy::elf::SymbolTableSection::finalize(), and llvm::objcopy::elf::GroupSection::finalize().
uint64_t llvm::objcopy::elf::SectionBase::Link = ELF::SHN_UNDEF |
Definition at line 526 of file ELFObject.h.
Referenced by llvm::objcopy::elf::Object::addNewSymbolTable(), llvm::objcopy::elf::Section::finalize(), llvm::objcopy::elf::SectionIndexSection::finalize(), llvm::objcopy::elf::SymbolTableSection::finalize(), llvm::objcopy::elf::GroupSection::finalize(), llvm::objcopy::elf::Section::initialize(), llvm::objcopy::elf::SectionIndexSection::initialize(), and llvm::objcopy::elf::SymbolTableSection::initialize().
std::string llvm::objcopy::elf::SectionBase::Name |
Definition at line 511 of file ELFObject.h.
Referenced by llvm::objcopy::elf::Object::addNewSymbolTable(), llvm::objcopy::elf::StringTableSection::addString(), llvm::objcopy::elf::BasicELFBuilder::addStrTab(), llvm::objcopy::elf::SymbolTableSection::addSymbol(), llvm::objcopy::elf::BasicELFBuilder::addSymTab(), llvm::objcopy::elf::ASCIIHexWriter::checkSection(), llvm::objcopy::elf::RelocSectionWithSymtabBase< DynamicSymbolTableSection >::finalize(), llvm::objcopy::elf::StringTableSection::findIndex(), handleArgs(), llvm::objcopy::elf::Section::initialize(), llvm::objcopy::elf::SectionIndexSection::initialize(), initRelocations(), isDebugSection(), isDWOSection(), llvm::objcopy::elf::OwnedDataSection::OwnedDataSection(), llvm::objcopy::elf::Section::removeSectionReferences(), llvm::objcopy::elf::SymbolTableSection::removeSectionReferences(), llvm::objcopy::elf::GroupSection::removeSectionReferences(), llvm::objcopy::elf::DynamicRelocationSection::removeSectionReferences(), llvm::objcopy::elf::SectionIndexSection::SectionIndexSection(), llvm::objcopy::elf::ELFSectionWriter< ELFT >::visit(), and llvm::objcopy::elf::BinarySectionWriter::visit().
uint64_t llvm::objcopy::elf::SectionBase::NameIndex = 0 |
Definition at line 527 of file ELFObject.h.
uint64_t llvm::objcopy::elf::SectionBase::Offset = 0 |
Definition at line 528 of file ELFObject.h.
Referenced by layoutSegmentsForOnlyKeepDebug(), setSectionType(), llvm::objcopy::elf::ELFSectionWriter< ELFT >::visit(), llvm::objcopy::elf::SectionWriter::visit(), and llvm::objcopy::elf::BinaryWriter::write().
ArrayRef<uint8_t> llvm::objcopy::elf::SectionBase::OriginalData |
Definition at line 531 of file ELFObject.h.
Referenced by llvm::objcopy::elf::CompressedSection::CompressedSection(), and llvm::objcopy::elf::ELFSectionWriter< ELFT >::visit().
uint64_t llvm::objcopy::elf::SectionBase::OriginalFlags = 0 |
Definition at line 517 of file ELFObject.h.
Referenced by llvm::objcopy::elf::CompressedSection::classof(), llvm::objcopy::elf::StringTableSection::classof(), llvm::objcopy::elf::RelocationSection::classof(), llvm::objcopy::elf::DynamicRelocationSection::classof(), llvm::objcopy::elf::CompressedSection::CompressedSection(), llvm::objcopy::elf::DecompressedSection::DecompressedSection(), and llvm::objcopy::elf::OwnedDataSection::OwnedDataSection().
uint32_t llvm::objcopy::elf::SectionBase::OriginalIndex = 0 |
Definition at line 516 of file ELFObject.h.
Definition at line 519 of file ELFObject.h.
Referenced by layoutSections(), layoutSectionsForOnlyKeepDebug(), llvm::objcopy::elf::OwnedDataSection::OwnedDataSection(), sectionPhysicalAddr(), and sectionWithinSegment().
uint64_t llvm::objcopy::elf::SectionBase::OriginalType = ELF::SHT_NULL |
Definition at line 518 of file ELFObject.h.
Referenced by llvm::objcopy::elf::StringTableSection::classof(), llvm::objcopy::elf::SymbolTableSection::classof(), llvm::objcopy::elf::RelocationSectionBase::classof(), llvm::objcopy::elf::GroupSection::classof(), llvm::objcopy::elf::DynamicSymbolTableSection::classof(), llvm::objcopy::elf::DynamicSection::classof(), llvm::objcopy::elf::DynamicRelocationSection::classof(), llvm::objcopy::elf::OwnedDataSection::OwnedDataSection(), llvm::objcopy::elf::SectionIndexSection::SectionIndexSection(), llvm::objcopy::elf::StringTableSection::StringTableSection(), and llvm::objcopy::elf::SymbolTableSection::SymbolTableSection().
Segment* llvm::objcopy::elf::SectionBase::ParentSegment = nullptr |
Definition at line 512 of file ELFObject.h.
Referenced by sectionPhysicalAddr().
uint64_t llvm::objcopy::elf::SectionBase::Size = 0 |
Definition at line 529 of file ELFObject.h.
Referenced by llvm::objcopy::elf::SectionIndexSection::addIndex(), llvm::objcopy::elf::SymbolTableSection::addSymbol(), llvm::objcopy::elf::OwnedDataSection::appendHexData(), llvm::objcopy::elf::ASCIIHexWriter::checkSection(), llvm::objcopy::elf::CompressedSection::CompressedSection(), llvm::objcopy::elf::DecompressedSection::DecompressedSection(), llvm::objcopy::elf::SectionIndexSection::initialize(), llvm::objcopy::elf::SymbolTableSection::initialize(), layoutSegmentsForOnlyKeepDebug(), llvm::objcopy::elf::OwnedDataSection::OwnedDataSection(), llvm::objcopy::elf::StringTableSection::prepareForLayout(), llvm::objcopy::elf::SymbolTableSection::removeSymbols(), llvm::objcopy::elf::SectionIndexSection::reserve(), sectionWithinSegment(), llvm::objcopy::elf::ELFSectionWriter< ELFT >::visit(), llvm::objcopy::elf::SRECSectionWriterBase::visit(), llvm::objcopy::elf::IHexSectionWriterBase::visit(), llvm::objcopy::elf::IHexSectionWriter::visit(), llvm::objcopy::elf::SRECSectionWriter::visit(), llvm::objcopy::elf::ELFSectionSizer< ELFT >::visit(), llvm::objcopy::elf::BinaryWriter::write(), llvm::objcopy::elf::SRECSectionWriterBase::writeSection(), and llvm::objcopy::elf::IHexSectionWriterBase::writeSection().
uint64_t llvm::objcopy::elf::SectionBase::Type = ELF::SHT_NULL |
Definition at line 530 of file ELFObject.h.
Referenced by llvm::objcopy::elf::SymbolTableSection::addSymbol(), handleArgs(), llvm::objcopy::elf::Section::initialize(), layoutSegmentsForOnlyKeepDebug(), sectionWithinSegment(), setSectionFlagsAndType(), setSectionType(), llvm::objcopy::elf::ELFSectionWriter< ELFT >::visit(), and llvm::objcopy::elf::ELFSectionSizer< ELFT >::visit().