aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-readobj/llvm-readobj.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2013-02-20 02:37:12 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2013-02-20 02:37:12 +0000
commitd326d05fb9c794e93fc7fc0601028f196600f7e2 (patch)
treecf029adfcba0f251aac254aae9fc6510852a7560 /tools/llvm-readobj/llvm-readobj.cpp
parent7cc098d805b3c294e842f8ceea3e5e55652f33f9 (diff)
[llvm-readobj] Add ELF .dynamic table dumping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-readobj/llvm-readobj.cpp')
-rw-r--r--tools/llvm-readobj/llvm-readobj.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/llvm-readobj/llvm-readobj.cpp b/tools/llvm-readobj/llvm-readobj.cpp
index 0a43775ef2..8f0917fc91 100644
--- a/tools/llvm-readobj/llvm-readobj.cpp
+++ b/tools/llvm-readobj/llvm-readobj.cpp
@@ -19,6 +19,8 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm-readobj.h"
+
#include "llvm/ADT/Triple.h"
#include "llvm/Analysis/Verifier.h"
#include "llvm/Object/ELF.h"
@@ -263,6 +265,13 @@ int main(int argc, char** argv) {
dump(obj, &dumpSection, obj->begin_sections(), obj->end_sections(),
"Section iteration failed");
+ if (obj->isELF()) {
+ if (ErrorOr<void> e = dumpELFDynamicTable(obj, outs()))
+ ;
+ else
+ errs() << "InputFilename" << ": " << error_code(e).message() << "\n";
+ }
+
outs() << "Libraries needed:\n";
dump(obj, &dumpLibrary, obj->begin_libraries_needed(),
obj->end_libraries_needed(), "Needed libraries iteration failed");