summaryrefslogtreecommitdiff
path: root/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-09-27 21:04:00 +0000
committerRui Ueyama <ruiu@google.com>2013-09-27 21:04:00 +0000
commita6610ee882fcb8bcad60d53fc52b80f00a3fddae (patch)
tree83c3eaa619ccecb6a3b9a53f4d0bf662f3c1f3aa /tools/llvm-objdump/llvm-objdump.cpp
parent52fbca55ad4c11516b87544a2048667b63d0694c (diff)
downloadllvm-a6610ee882fcb8bcad60d53fc52b80f00a3fddae.tar.gz
llvm-a6610ee882fcb8bcad60d53fc52b80f00a3fddae.tar.bz2
llvm-a6610ee882fcb8bcad60d53fc52b80f00a3fddae.tar.xz
Re-submit r191472 with a fix for big endian.
llvm-objdump: Dump COFF import table if -private-headers option is given. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r--tools/llvm-objdump/llvm-objdump.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp
index 8065787945..9bc092e188 100644
--- a/tools/llvm-objdump/llvm-objdump.cpp
+++ b/tools/llvm-objdump/llvm-objdump.cpp
@@ -770,6 +770,14 @@ static void PrintUnwindInfo(const ObjectFile *o) {
}
}
+static void printPrivateFileHeader(const ObjectFile *o) {
+ if (o->isELF()) {
+ printELFFileHeader(o);
+ } else if (o->isCOFF()) {
+ printCOFFFileHeader(o);
+ }
+}
+
static void DumpObject(const ObjectFile *o) {
outs() << '\n';
outs() << o->getFileName()
@@ -787,8 +795,8 @@ static void DumpObject(const ObjectFile *o) {
PrintSymbolTable(o);
if (UnwindInfo)
PrintUnwindInfo(o);
- if (PrivateHeaders && o->isELF())
- printELFFileHeader(o);
+ if (PrivateHeaders)
+ printPrivateFileHeader(o);
}
/// @brief Dump each object file in \a a;