| LLVM 22.0.0git
    | 
#include "ObjCopy/ELF/ELFObject.h"
| Public Types | |
| template<class T> | |
| using | ConstRange | 
| 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) | 
| Error | updateSectionData (SectionBase &S, 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 | compressOrDecompressSections (const CommonConfig &Config) | 
| 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 | 
| bool | Is64Bits | 
| 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 1158 of file ELFObject.h.
| using llvm::objcopy::elf::Object::ConstRange | 
Definition at line 1176 of file ELFObject.h.
| Error Object::addNewSymbolTable | ( | ) | 
Definition at line 2293 of file ELFObject.cpp.
References addSection(), llvm::objcopy::elf::SymbolTableSection::addSymbol(), assert(), llvm::objcopy::elf::SectionBase::Index, llvm::objcopy::elf::SymbolTableSection::initialize(), llvm::objcopy::elf::SectionBase::Link, llvm::objcopy::elf::SectionBase::Name, SectionNames, sections(), llvm::ELF::SHF_ALLOC, llvm::ELF::SHT_STRTAB, llvm::Error::success(), and SymbolTable.
Referenced by handleArgs().
Definition at line 1232 of file ELFObject.h.
References llvm::isa(), MustBeRelocatable, Ptr, and T.
Referenced by addNewSymbolTable(), compressOrDecompressSections(), and handleArgs().
Definition at line 1241 of file ELFObject.h.
References llvm::Data.
| 
 | inline | 
Definition at line 1210 of file ELFObject.h.
References llvm::make_filter_range(), and llvm::make_pointee_range().
| Error Object::compressOrDecompressSections | ( | const CommonConfig & | Config | ) | 
Definition at line 213 of file ELFObjcopy.cpp.
References addSection(), llvm::objcopy::CommonConfig::CompressionType, llvm::objcopy::CommonConfig::compressSections, llvm::createStringError(), llvm::objcopy::CommonConfig::DecompressDebugSections, llvm::dyn_cast(), llvm::invalid_argument, Is64Bits, llvm::None, replaceSections(), sections(), llvm::ELF::SHF_ALLOC, llvm::StringRef::starts_with(), and T.
Referenced by replaceAndRemoveSections().
| 
 | inline | 
| 
 | inline | 
Definition at line 1214 of file ELFObject.h.
| 
 | inline | 
Definition at line 1245 of file ELFObject.h.
References llvm::ELF::ET_DYN, llvm::ELF::ET_EXEC, MustBeRelocatable, and Type.
Referenced by isRequiredByABISymbol(), removeUnneededSections(), and updateAndRemoveSymbols().
| 
 | inline | 
Definition at line 1223 of file ELFObject.h.
| Error Object::removeSections | ( | bool | AllowBrokenLinks, | 
| std::function< bool(const SectionBase &)> | ToRemove ) | 
Definition at line 2200 of file ELFObject.cpp.
References llvm::all_of(), llvm::cast(), llvm::dyn_cast(), llvm::isa(), llvm::make_range(), llvm::objcopy::elf::GroupSection::members(), llvm::objcopy::elf::Segment::removeSection(), SectionIndexTable, SectionNames, llvm::ELF::SHT_GROUP, 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 2285 of file ELFObject.cpp.
References llvm::Error::success(), SymbolTable, and ToRemove.
Referenced by updateAndRemoveSymbols().
| Error Object::replaceSections | ( | const DenseMap< SectionBase *, SectionBase * > & | FromTo | ) | 
Definition at line 2261 of file ELFObject.cpp.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), I, llvm::is_sorted(), removeSections(), llvm::sort(), and llvm::Error::success().
Referenced by compressOrDecompressSections().
| 
 | inline | 
Definition at line 1206 of file ELFObject.h.
Referenced by addNewSymbolTable(), compressOrDecompressSections(), dumpSectionToFile(), handleArgs(), layoutSectionsForOnlyKeepDebug(), removeNotes(), and updateAndRemoveSymbols().
| 
 | inline | 
Definition at line 1225 of file ELFObject.h.
References llvm::make_pointee_range().
Referenced by handleArgs(), and removeNotes().
Definition at line 2184 of file ELFObject.cpp.
References llvm::createStringError(), llvm::Data, llvm::find_if(), and llvm::invalid_argument.
Referenced by handleArgs().
| Error Object::updateSectionData | ( | SectionBase & | S, | 
| ArrayRef< uint8_t > | Data ) | 
Definition at line 2193 of file ELFObject.cpp.
References assert(), llvm::Data, and llvm::find_if().
| uint8_t llvm::objcopy::elf::Object::ABIVersion | 
Definition at line 1190 of file ELFObject.h.
| Segment llvm::objcopy::elf::Object::ElfHdrSegment | 
Definition at line 1185 of file ELFObject.h.
| uint64_t llvm::objcopy::elf::Object::Entry | 
Definition at line 1191 of file ELFObject.h.
Referenced by handleArgs().
| uint32_t llvm::objcopy::elf::Object::Flags | 
Definition at line 1196 of file ELFObject.h.
| bool llvm::objcopy::elf::Object::HadShdrs = true | 
Definition at line 1198 of file ELFObject.h.
| bool llvm::objcopy::elf::Object::Is64Bits | 
Definition at line 1188 of file ELFObject.h.
Referenced by compressOrDecompressSections().
| bool llvm::objcopy::elf::Object::IsMips64EL = false | 
Definition at line 1204 of file ELFObject.h.
Referenced by initRelocations(), and llvm::objcopy::elf::ELFSectionWriter< ELFT >::visit().
| uint32_t llvm::objcopy::elf::Object::Machine | 
Definition at line 1194 of file ELFObject.h.
Referenced by handleArgs(), and isRequiredByABISymbol().
| bool llvm::objcopy::elf::Object::MustBeRelocatable = false | 
Definition at line 1199 of file ELFObject.h.
Referenced by addSection(), and isRelocatable().
| uint8_t llvm::objcopy::elf::Object::OSABI | 
Definition at line 1189 of file ELFObject.h.
Referenced by handleArgs().
| Segment llvm::objcopy::elf::Object::ProgramHdrSegment | 
Definition at line 1186 of file ELFObject.h.
| SectionIndexSection* llvm::objcopy::elf::Object::SectionIndexTable = nullptr | 
Definition at line 1202 of file ELFObject.h.
Referenced by removeSections().
| StringTableSection* llvm::objcopy::elf::Object::SectionNames = nullptr | 
Definition at line 1200 of file ELFObject.h.
Referenced by addNewSymbolTable(), onlyKeepDWOPred(), removeSections(), removeUnneededSections(), and replaceAndRemoveSections().
| uint64_t llvm::objcopy::elf::Object::SHOff | 
Definition at line 1192 of file ELFObject.h.
| SymbolTableSection* llvm::objcopy::elf::Object::SymbolTable = nullptr | 
Definition at line 1201 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 1193 of file ELFObject.h.
Referenced by handleArgs(), and isRelocatable().
| uint32_t llvm::objcopy::elf::Object::Version | 
Definition at line 1195 of file ELFObject.h.