diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-10-07 19:37:52 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-10-07 19:37:52 +0000 |
commit | f95786324c233dcfa28da5fea929e62bc50b4083 (patch) | |
tree | 0fd3efdbc08a8068ee77cf2b3431d74348a5f7ab /llvm/tools/llvm-readobj/llvm-readobj.cpp | |
parent | 1419e9adb5f4586a4950bf99acd40b2ca46ef648 (diff) | |
download | bcm5719-llvm-f95786324c233dcfa28da5fea929e62bc50b4083.tar.gz bcm5719-llvm-f95786324c233dcfa28da5fea929e62bc50b4083.zip |
llvm-readobj: add support to dump (COFF) directives
PE/COFF has a special section (.drectve) which can be used to pass options to
the linker (similar to LC_LINKER_OPTION). Add support to llvm-readobj to print
the contents of the section for tests.
llvm-svn: 219228
Diffstat (limited to 'llvm/tools/llvm-readobj/llvm-readobj.cpp')
-rw-r--r-- | llvm/tools/llvm-readobj/llvm-readobj.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/tools/llvm-readobj/llvm-readobj.cpp b/llvm/tools/llvm-readobj/llvm-readobj.cpp index 31a011d2b9e..55eadd887c7 100644 --- a/llvm/tools/llvm-readobj/llvm-readobj.cpp +++ b/llvm/tools/llvm-readobj/llvm-readobj.cpp @@ -145,6 +145,11 @@ namespace opts { // -coff-imports cl::opt<bool> COFFImports("coff-imports", cl::desc("Display the PE/COFF import table")); + + // -coff-directives + cl::opt<bool> + COFFDirectives("coff-directives", + cl::desc("Display the contents PE/COFF .drectve section")); } // namespace opts static int ReturnValue = EXIT_SUCCESS; @@ -272,6 +277,8 @@ static void dumpObject(const ObjectFile *Obj) { Dumper->printMipsPLTGOT(); if (opts::COFFImports) Dumper->printCOFFImports(); + if (opts::COFFDirectives) + Dumper->printCOFFDirectives(); } |