LLVM 20.0.0git
|
#include "llvm/Object/Archive.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Object/Binary.h"
#include "llvm/Object/Error.h"
#include "llvm/Support/Chrono.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Host.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <system_error>
Go to the source code of this file.
Classes | |
struct | GlobalSymtabInfo |
Functions | |
static Error | malformedError (Twine Msg) |
static Error | createMemberHeaderParseError (const AbstractArchiveMemberHeader *ArMemHeader, const char *RawHeaderPtr, uint64_t Size) |
template<class T , std::size_t N> | |
StringRef | getFieldRawString (const T(&Field)[N]) |
Expected< uint64_t > | getArchiveMemberDecField (Twine FieldName, const StringRef RawField, const Archive *Parent, const AbstractArchiveMemberHeader *MemHeader) |
Expected< uint64_t > | getArchiveMemberOctField (Twine FieldName, const StringRef RawField, const Archive *Parent, const AbstractArchiveMemberHeader *MemHeader) |
static Error | getGlobalSymtabLocAndSize (const MemoryBufferRef &Data, uint64_t GlobalSymtabOffset, const char *&GlobalSymtabLoc, uint64_t &Size, const char *BitMessage) |
static void | appendGlobalSymbolTableInfo (SmallVector< GlobalSymtabInfo > &SymtabInfos, const char *GlobalSymtabLoc, uint64_t Size) |
|
static |
Definition at line 1326 of file Archive.cpp.
References llvm::StringRef::data(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::support::endian::read64be(), Size, llvm::object::Archive::StringTable, and llvm::object::Archive::SymbolTable.
Referenced by llvm::object::BigArchive::BigArchive().
|
static |
Definition at line 51 of file Archive.cpp.
References llvm::consumeError(), llvm::StringRef::data(), llvm::object::Binary::getData(), llvm::object::AbstractArchiveMemberHeader::getName(), malformedError(), llvm::Offset, llvm::object::AbstractArchiveMemberHeader::Parent, Size, and llvm::Expected< T >::takeError().
Referenced by llvm::object::ArchiveMemberHeader::ArchiveMemberHeader(), and llvm::object::BigArchiveMemberHeader::BigArchiveMemberHeader().
Expected< uint64_t > getArchiveMemberDecField | ( | Twine | FieldName, |
const StringRef | RawField, | ||
const Archive * | Parent, | ||
const AbstractArchiveMemberHeader * | MemHeader | ||
) |
Definition at line 181 of file Archive.cpp.
References llvm::StringRef::getAsInteger(), llvm::object::AbstractArchiveMemberHeader::getOffset(), malformedError(), and llvm::Offset.
Referenced by llvm::object::AbstractArchiveMemberHeader::getGID(), llvm::object::AbstractArchiveMemberHeader::getLastModified(), llvm::object::BigArchiveMemberHeader::getNextOffset(), llvm::object::BigArchiveMemberHeader::getRawName(), llvm::object::BigArchiveMemberHeader::getRawNameSize(), llvm::object::ArchiveMemberHeader::getSize(), llvm::object::BigArchiveMemberHeader::getSize(), and llvm::object::AbstractArchiveMemberHeader::getUID().
Expected< uint64_t > getArchiveMemberOctField | ( | Twine | FieldName, |
const StringRef | RawField, | ||
const Archive * | Parent, | ||
const AbstractArchiveMemberHeader * | MemHeader | ||
) |
Definition at line 199 of file Archive.cpp.
References llvm::StringRef::getAsInteger(), llvm::object::AbstractArchiveMemberHeader::getOffset(), malformedError(), and llvm::Offset.
Referenced by llvm::object::AbstractArchiveMemberHeader::getAccessMode().
Definition at line 66 of file Archive.cpp.
References N, and llvm::StringRef::rtrim().
Referenced by llvm::object::BigArchive::BigArchive(), getGlobalSymtabLocAndSize(), llvm::object::BigArchiveMemberHeader::getNextOffset(), llvm::object::CommonArchiveMemberHeader< T >::getRawAccessMode(), llvm::object::CommonArchiveMemberHeader< T >::getRawGID(), llvm::object::CommonArchiveMemberHeader< T >::getRawLastModified(), llvm::object::BigArchiveMemberHeader::getRawName(), llvm::object::BigArchiveMemberHeader::getRawNameSize(), llvm::object::ArchiveMemberHeader::getSize(), and llvm::object::BigArchiveMemberHeader::getSize().
|
static |
Definition at line 1287 of file Archive.cpp.
References llvm::object::Binary::Data, llvm::StringRef::getAsInteger(), llvm::MemoryBufferRef::getBufferSize(), llvm::MemoryBufferRef::getBufferStart(), getFieldRawString(), malformedError(), llvm::object::BigArMemHdrType::Size, Size, llvm::Error::success(), and llvm::Twine::utohexstr().
Referenced by llvm::object::BigArchive::BigArchive().
Definition at line 44 of file Archive.cpp.
References llvm::object::parse_failed, and llvm::Twine::str().
Referenced by llvm::object::ArchiveMemberHeader::ArchiveMemberHeader(), llvm::object::BigArchive::BigArchive(), llvm::object::BigArchiveMemberHeader::BigArchiveMemberHeader(), llvm::object::MachOObjectFile::checkSymbolTable(), llvm::object::Archive::Child::Child(), createMemberHeaderParseError(), llvm::object::Archive::ec_symbols(), getArchiveMemberDecField(), getArchiveMemberOctField(), llvm::object::MachOObjectFile::getChainedFixupsHeader(), llvm::object::MachOObjectFile::getChainedFixupsSegments(), llvm::object::MachOObjectFile::getDyldChainedFixupTargets(), getGlobalSymtabLocAndSize(), llvm::object::ArchiveMemberHeader::getName(), llvm::object::Archive::Child::getNext(), llvm::object::ArchiveMemberHeader::getRawName(), llvm::object::BigArchiveMemberHeader::getRawName(), llvm::object::MachOObjectFile::getSection(), llvm::object::MachOObjectFile::getSymbolName(), llvm::object::MachOObjectFile::getSymbolSection(), llvm::object::MachOUniversalBinary::MachOUniversalBinary(), llvm::object::ExportEntry::moveNext(), llvm::object::MachORebaseEntry::moveNext(), llvm::object::MachOBindEntry::moveNext(), and llvm::object::MachOChainedFixupEntry::moveNext().