summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj/llvm-readobj.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2016-05-04 05:58:57 +0000
committerSimon Atanasyan <simon@atanasyan.com>2016-05-04 05:58:57 +0000
commit8a71b53ea9bab7fe0f8e01a89a427e78cbc46df3 (patch)
tree71af0e25c65674cb9c6c6de398b4f370dcf0fa55 /llvm/tools/llvm-readobj/llvm-readobj.cpp
parent7d5169b68d2bc08da91a85322d981cd469117060 (diff)
downloadbcm5719-llvm-8a71b53ea9bab7fe0f8e01a89a427e78cbc46df3.tar.gz
bcm5719-llvm-8a71b53ea9bab7fe0f8e01a89a427e78cbc46df3.zip
[llvm-readobj] Print MIPS .MIPS.options section content
.MIPS.options section specifies miscellaneous options to be applied to an object file. LLVM as well as modern versions of GNU tools emit the only type of the options - ODK_REGINFO. The patch teaches llvm-readobj to print details of the ODK_REGINFO and skip contents of other options. llvm-svn: 268478
Diffstat (limited to 'llvm/tools/llvm-readobj/llvm-readobj.cpp')
-rw-r--r--llvm/tools/llvm-readobj/llvm-readobj.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/llvm-readobj/llvm-readobj.cpp b/llvm/tools/llvm-readobj/llvm-readobj.cpp
index fe075a54f96..c2964c5f5e1 100644
--- a/llvm/tools/llvm-readobj/llvm-readobj.cpp
+++ b/llvm/tools/llvm-readobj/llvm-readobj.cpp
@@ -168,6 +168,10 @@ namespace opts {
cl::opt<bool> MipsReginfo("mips-reginfo",
cl::desc("Display the MIPS .reginfo section"));
+ // -mips-options
+ cl::opt<bool> MipsOptions("mips-options",
+ cl::desc("Display the MIPS .MIPS.options section"));
+
// -coff-imports
cl::opt<bool>
COFFImports("coff-imports", cl::desc("Display the PE/COFF import table"));
@@ -363,6 +367,8 @@ static void dumpObject(const ObjectFile *Obj) {
Dumper->printMipsABIFlags();
if (opts::MipsReginfo)
Dumper->printMipsReginfo();
+ if (opts::MipsOptions)
+ Dumper->printMipsOptions();
}
if (opts::SectionGroups)
Dumper->printGroupSections();
OpenPOWER on IntegriCloud