mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
macho-dump: Add support for dumping symbol table entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120218 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -250,6 +250,25 @@ namespace macho {
|
||||
uint32_t Reserved3;
|
||||
};
|
||||
|
||||
/// @}
|
||||
/// @name Symbol Table Entries
|
||||
/// @{
|
||||
|
||||
struct SymbolTableEntry {
|
||||
uint32_t StringIndex;
|
||||
uint8_t Type;
|
||||
uint8_t SectionIndex;
|
||||
uint16_t Flags;
|
||||
uint32_t Value;
|
||||
};
|
||||
struct Symbol64TableEntry {
|
||||
uint32_t StringIndex;
|
||||
uint8_t Type;
|
||||
uint8_t SectionIndex;
|
||||
uint16_t Flags;
|
||||
uint64_t Value;
|
||||
};
|
||||
|
||||
/// @}
|
||||
/// @name Indirect Symbol Table
|
||||
/// @{
|
||||
|
@@ -111,6 +111,11 @@ public:
|
||||
return StringTable;
|
||||
}
|
||||
|
||||
StringRef getStringAtIndex(unsigned Index) const {
|
||||
size_t End = getStringTableData().find('\0', Index);
|
||||
return getStringTableData().slice(Index, End);
|
||||
}
|
||||
|
||||
void RegisterStringTable(macho::SymtabLoadCommand &SLC);
|
||||
|
||||
/// @}
|
||||
@@ -157,6 +162,12 @@ public:
|
||||
void ReadRelocationEntry(
|
||||
uint64_t RelocationTableOffset, unsigned Index,
|
||||
InMemoryStruct<macho::RelocationEntry> &Res) const;
|
||||
void ReadSymbolTableEntry(
|
||||
uint64_t SymbolTableOffset, unsigned Index,
|
||||
InMemoryStruct<macho::SymbolTableEntry> &Res) const;
|
||||
void ReadSymbol64TableEntry(
|
||||
uint64_t SymbolTableOffset, unsigned Index,
|
||||
InMemoryStruct<macho::Symbol64TableEntry> &Res) const;
|
||||
|
||||
/// @}
|
||||
};
|
||||
|
Reference in New Issue
Block a user