aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-01-16 20:50:34 +0000
committerRui Ueyama <ruiu@google.com>2014-01-16 20:50:34 +0000
commitda49d0d44c6b7f19a1535c899926e3c4131c6567 (patch)
treed44dbafa1801a997e39e8e64c8cdef9be4106960 /llvm/lib/Object/COFFObjectFile.cpp
parent1792ebc1ab12a0b24c05063721af489d2373ce8d (diff)
downloadllvm-da49d0d44c6b7f19a1535c899926e3c4131c6567.zip
llvm-da49d0d44c6b7f19a1535c899926e3c4131c6567.tar.gz
llvm-da49d0d44c6b7f19a1535c899926e3c4131c6567.tar.bz2
llvm-objdump/COFF: Print DLL name in the export table header.
llvm-svn: 199422
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 3663cd9..4709612 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/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))