diff options
author | Rui Ueyama <ruiu@google.com> | 2014-01-16 20:50:34 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2014-01-16 20:50:34 +0000 |
commit | 6010e5dfee44e3a26d32317d3f80f4ce2dbebb99 (patch) | |
tree | 6a193f1d51aead2736eea8c9351b448d6ca842ed /lib/Object/COFFObjectFile.cpp | |
parent | a2a8bbb30f271843dd0678f563a62154919e09b4 (diff) | |
download | llvm-6010e5dfee44e3a26d32317d3f80f4ce2dbebb99.tar.gz llvm-6010e5dfee44e3a26d32317d3f80f4ce2dbebb99.tar.bz2 llvm-6010e5dfee44e3a26d32317d3f80f4ce2dbebb99.tar.xz |
llvm-objdump/COFF: Print DLL name in the export table header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object/COFFObjectFile.cpp')
-rw-r--r-- | lib/Object/COFFObjectFile.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index 3663cd9c9a..4709612167 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -949,6 +949,16 @@ ExportDirectoryEntryRef::getNext(ExportDirectoryEntryRef &Result) const { return object_error::success; } +// Returns the name of the current export symbol. If the symbol is exported only +// by ordinal, the empty string is set as a result. +error_code ExportDirectoryEntryRef::getDllName(StringRef &Result) const { + uintptr_t IntPtr = 0; + if (error_code EC = OwningObject->getRvaPtr(ExportTable->NameRVA, IntPtr)) + return EC; + Result = StringRef(reinterpret_cast<const char *>(IntPtr)); + 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; @@ -968,7 +978,7 @@ error_code ExportDirectoryEntryRef::getExportRVA(uint32_t &Result) const { // Returns the name of the current export symbol. If the symbol is exported only // by ordinal, the empty string is set as a result. -error_code ExportDirectoryEntryRef::getName(StringRef &Result) const { +error_code ExportDirectoryEntryRef::getSymbolName(StringRef &Result) const { uintptr_t IntPtr = 0; if (error_code EC = OwningObject->getRvaPtr( ExportTable->OrdinalTableRVA, IntPtr)) |