LLVM
15.0.0git
|
#include "ObjCopy/ELF/ELFObject.h"
Public Types | |
template<class T > | |
using | ConstRange = iterator_range< pointee_iterator< typename std::vector< std::unique_ptr< T > >::const_iterator > > |
Public Member Functions | |
SectionTableRef | sections () const |
iterator_range< filter_iterator< pointee_iterator< std::vector< SecPtr >::const_iterator >, decltype(§ionIsAlloc)> > | allocSections () const |
const auto & | getUpdatedSections () const |
Error | updateSection (StringRef Name, ArrayRef< uint8_t > Data) |
SectionBase * | findSection (StringRef Name) |
SectionTableRef | removedSections () |
ConstRange< Segment > | segments () const |
Error | removeSections (bool AllowBrokenLinks, std::function< bool(const SectionBase &)> ToRemove) |
Error | replaceSections (const DenseMap< SectionBase *, SectionBase * > &FromTo) |
Error | removeSymbols (function_ref< bool(const Symbol &)> ToRemove) |
template<class T , class... Ts> | |
T & | addSection (Ts &&...Args) |
Error | addNewSymbolTable () |
Segment & | addSegment (ArrayRef< uint8_t > Data) |
bool | isRelocatable () const |
Public Attributes | |
Segment | ElfHdrSegment |
Segment | ProgramHdrSegment |
uint8_t | OSABI |
uint8_t | ABIVersion |
uint64_t | Entry |
uint64_t | SHOff |
uint32_t | Type |
uint32_t | Machine |
uint32_t | Version |
uint32_t | Flags |
bool | HadShdrs = true |
bool | MustBeRelocatable = false |
StringTableSection * | SectionNames = nullptr |
SymbolTableSection * | SymbolTable = nullptr |
SectionIndexSection * | SectionIndexTable = nullptr |
bool | IsMips64EL = false |
Definition at line 1017 of file ELFObject.h.
using llvm::objcopy::elf::Object::ConstRange = iterator_range<pointee_iterator< typename std::vector<std::unique_ptr<T> >::const_iterator> > |
Definition at line 1034 of file ELFObject.h.
Error Object::addNewSymbolTable | ( | ) |
Definition at line 2232 of file ELFObject.cpp.
References assert(), llvm::objcopy::elf::SectionBase::Index, llvm::objcopy::elf::SectionBase::Link, llvm::objcopy::elf::SectionBase::Name, SectionNames, sections(), llvm::ELF::SHF_ALLOC, llvm::ELF::SHT_STRTAB, and SymbolTable.
Referenced by handleArgs().
|
inline |
Definition at line 1086 of file ELFObject.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, move, MustBeRelocatable, and T.
Referenced by handleArgs().
Definition at line 1095 of file ELFObject.h.
References llvm::Data.
|
inline |
Definition at line 1066 of file ELFObject.h.
References llvm::make_filter_range(), and llvm::make_pointee_range().
Referenced by llvm::objcopy::elf::BinaryWriter::finalize(), and llvm::objcopy::elf::BinaryWriter::write().
|
inline |
|
inline |
Definition at line 1070 of file ELFObject.h.
|
inline |
Definition at line 1099 of file ELFObject.h.
References llvm::ELF::ET_DYN, llvm::ELF::ET_EXEC, and MustBeRelocatable.
Referenced by isRequiredByABISymbol(), removeUnneededSections(), and updateAndRemoveSymbols().
|
inline |
Definition at line 1078 of file ELFObject.h.
Error Object::removeSections | ( | bool | AllowBrokenLinks, |
std::function< bool(const SectionBase &)> | ToRemove | ||
) |
Definition at line 2148 of file ELFObject.cpp.
References llvm::sys::path::begin(), E, llvm::sys::path::end(), llvm::make_range(), move, llvm::objcopy::elf::Segment::removeSection(), llvm::objcopy::elf::SectionIndexSection::reserve(), SectionIndexTable, SectionNames, llvm::Error::success(), SymbolTable, and ToRemove.
Referenced by handleArgs(), removeUnneededSections(), replaceAndRemoveSections(), and replaceSections().
Error Object::removeSymbols | ( | function_ref< bool(const Symbol &)> | ToRemove | ) |
Definition at line 2224 of file ELFObject.cpp.
References E, llvm::Error::success(), SymbolTable, and ToRemove.
Referenced by updateAndRemoveSymbols().
Error Object::replaceSections | ( | const DenseMap< SectionBase *, SectionBase * > & | FromTo | ) |
Definition at line 2200 of file ELFObject.cpp.
References assert(), E, I, llvm::is_sorted(), removeSections(), llvm::sort(), and llvm::Error::success().
Referenced by replaceDebugSections().
|
inline |
Definition at line 1062 of file ELFObject.h.
Referenced by addNewSymbolTable(), dumpSectionToFile(), llvm::objcopy::elf::IHexWriter::finalize(), handleArgs(), layoutSectionsForOnlyKeepDebug(), replaceDebugSections(), and updateAndRemoveSymbols().
|
inline |
Definition at line 1080 of file ELFObject.h.
References llvm::make_pointee_range().
Definition at line 2117 of file ELFObject.cpp.
References llvm::createStringError(), llvm::Data, llvm::find_if(), llvm::invalid_argument, and llvm::Error::success().
Referenced by handleArgs().
uint8_t llvm::objcopy::elf::Object::ABIVersion |
Definition at line 1046 of file ELFObject.h.
Segment llvm::objcopy::elf::Object::ElfHdrSegment |
Definition at line 1042 of file ELFObject.h.
uint64_t llvm::objcopy::elf::Object::Entry |
Definition at line 1047 of file ELFObject.h.
Referenced by llvm::objcopy::elf::IHexWriter::finalize(), and handleArgs().
uint32_t llvm::objcopy::elf::Object::Flags |
Definition at line 1052 of file ELFObject.h.
bool llvm::objcopy::elf::Object::HadShdrs = true |
Definition at line 1054 of file ELFObject.h.
bool llvm::objcopy::elf::Object::IsMips64EL = false |
Definition at line 1060 of file ELFObject.h.
Referenced by initRelocations(), and llvm::objcopy::elf::ELFSectionWriter< ELFT >::visit().
uint32_t llvm::objcopy::elf::Object::Machine |
Definition at line 1050 of file ELFObject.h.
Referenced by handleArgs(), and isRequiredByABISymbol().
bool llvm::objcopy::elf::Object::MustBeRelocatable = false |
Definition at line 1055 of file ELFObject.h.
Referenced by addSection(), and isRelocatable().
uint8_t llvm::objcopy::elf::Object::OSABI |
Definition at line 1045 of file ELFObject.h.
Referenced by handleArgs().
Segment llvm::objcopy::elf::Object::ProgramHdrSegment |
Definition at line 1043 of file ELFObject.h.
SectionIndexSection* llvm::objcopy::elf::Object::SectionIndexTable = nullptr |
Definition at line 1058 of file ELFObject.h.
Referenced by removeSections().
StringTableSection* llvm::objcopy::elf::Object::SectionNames = nullptr |
Definition at line 1056 of file ELFObject.h.
Referenced by addNewSymbolTable(), onlyKeepDWOPred(), removeSections(), removeUnneededSections(), and replaceAndRemoveSections().
uint64_t llvm::objcopy::elf::Object::SHOff |
Definition at line 1048 of file ELFObject.h.
SymbolTableSection* llvm::objcopy::elf::Object::SymbolTable = nullptr |
Definition at line 1057 of file ELFObject.h.
Referenced by addNewSymbolTable(), addSymbol(), handleArgs(), initRelocations(), removeSections(), removeSymbols(), removeUnneededSections(), replaceAndRemoveSections(), and updateAndRemoveSymbols().
uint32_t llvm::objcopy::elf::Object::Type |
Definition at line 1049 of file ELFObject.h.
uint32_t llvm::objcopy::elf::Object::Version |
Definition at line 1051 of file ELFObject.h.