diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-06 03:31:08 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-06 03:31:08 +0000 |
commit | 82a21077a004087a87711bfd7a4ab171cebaa5ec (patch) | |
tree | f26fea69e40f2a77cd5aa817c99cc4e2f6a2c177 /include | |
parent | 05b5bdd024d07e7a62f1cdc39f465e10ce5dbc6d (diff) | |
download | llvm-82a21077a004087a87711bfd7a4ab171cebaa5ec.tar.gz llvm-82a21077a004087a87711bfd7a4ab171cebaa5ec.tar.bz2 llvm-82a21077a004087a87711bfd7a4ab171cebaa5ec.tar.xz |
Don't use InMemoryStruct<macho::SymtabLoadCommand>.
This also required not using the RegisterStringTable API, which is also a
good thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Object/MachO.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/include/llvm/Object/MachO.h b/include/llvm/Object/MachO.h index 1da9a912d3..d6abaf1be2 100644 --- a/include/llvm/Object/MachO.h +++ b/include/llvm/Object/MachO.h @@ -76,6 +76,15 @@ namespace MachOFormat { support::ulittle16_t Flags; support::ulittle64_t Value; }; + + struct SymtabLoadCommand { + support::ulittle32_t Type; + support::ulittle32_t Size; + support::ulittle32_t SymbolTableOffset; + support::ulittle32_t NumSymbolTableEntries; + support::ulittle32_t StringTableOffset; + support::ulittle32_t StringTableSize; + }; } typedef MachOObject::LoadCommandInfo LoadCommandInfo; @@ -169,20 +178,32 @@ protected: private: OwningPtr<MachOObject> MachOObj; - mutable uint32_t RegisteredStringTable; typedef SmallVector<DataRefImpl, 1> SectionList; SectionList Sections; void moveToNextSection(DataRefImpl &DRI) const; + const MachOFormat::SymbolTableEntry * getSymbolTableEntry(DataRefImpl DRI) const; + + const MachOFormat::SymbolTableEntry * + getSymbolTableEntry(DataRefImpl DRI, + const MachOFormat::SymtabLoadCommand *SymtabLoadCmd) const; + const MachOFormat::Symbol64TableEntry * getSymbol64TableEntry(DataRefImpl DRI) const; + + const MachOFormat::Symbol64TableEntry * + getSymbol64TableEntry(DataRefImpl DRI, + const MachOFormat::SymtabLoadCommand *SymtabLoadCmd) const; + void moveToNextSymbol(DataRefImpl &DRI) const; const MachOFormat::Section *getSection(DataRefImpl DRI) const; const MachOFormat::Section64 *getSection64(DataRefImpl DRI) const; const MachOFormat::RelocationEntry *getRelocation(DataRefImpl Rel) const; + const MachOFormat::SymtabLoadCommand * + getSymtabLoadCommand(LoadCommandInfo LCI) const; std::size_t getSectionIndex(DataRefImpl Sec) const; void printRelocationTargetName(const MachOFormat::RelocationEntry *RE, |