mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
llvm-objdump/COFF: Print ordinal base number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199518 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -408,6 +408,7 @@ public:
|
||||
error_code getNext(ExportDirectoryEntryRef &Result) const;
|
||||
|
||||
error_code getDllName(StringRef &Result) const;
|
||||
error_code getOrdinalBase(uint32_t &Result) const;
|
||||
error_code getOrdinal(uint32_t &Result) const;
|
||||
error_code getExportRVA(uint32_t &Result) const;
|
||||
error_code getSymbolName(StringRef &Result) const;
|
||||
|
@@ -959,6 +959,12 @@ error_code ExportDirectoryEntryRef::getDllName(StringRef &Result) const {
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
// Returns the starting ordinal number.
|
||||
error_code ExportDirectoryEntryRef::getOrdinalBase(uint32_t &Result) const {
|
||||
Result = ExportTable->OrdinalBase;
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
// Returns the export ordinal of the current export symbol.
|
||||
error_code ExportDirectoryEntryRef::getOrdinal(uint32_t &Result) const {
|
||||
Result = ExportTable->OrdinalBase + Index;
|
||||
|
@@ -12,6 +12,7 @@ IMPORT-NEXT: 365 ExitProcess
|
||||
|
||||
EXPORT: Export Table:
|
||||
EXPORT-NEXT: DLL name: export.test.tmp3.dll
|
||||
EXPORT-NEXT: Ordinal base: 5
|
||||
EXPORT-NEXT: Ordinal RVA Name
|
||||
EXPORT-NEXT: 5 0x2008
|
||||
EXPORT-NEXT: 6 0x2010 exportfn2
|
||||
|
@@ -286,9 +286,13 @@ static void printExportTable(const COFFObjectFile *Obj) {
|
||||
if (I == E)
|
||||
return;
|
||||
StringRef DllName;
|
||||
uint32_t OrdinalBase;
|
||||
if (I->getDllName(DllName))
|
||||
return;
|
||||
if (I->getOrdinalBase(OrdinalBase))
|
||||
return;
|
||||
outs() << " DLL name: " << DllName << "\n";
|
||||
outs() << " Ordinal base: " << OrdinalBase << "\n";
|
||||
outs() << " Ordinal RVA Name\n";
|
||||
error_code EC;
|
||||
for (; I != E; I = I.increment(EC)) {
|
||||
|
Reference in New Issue
Block a user