[llvm-readobj] Add a flag to dump just the section-to-segment mapping.
authorMatt Davis <Matthew.Davis@sony.com>
Fri, 1 Feb 2019 18:51:10 +0000 (18:51 +0000)
committerMatt Davis <Matthew.Davis@sony.com>
Fri, 1 Feb 2019 18:51:10 +0000 (18:51 +0000)
commit50ca8edb1a0d94e057a28ae792e3b756bd08d809
tree999b6b97b1b82efc130184b881f94f2b4689eb8b
parent25b4c4ceb6861c4564bcb5280fa81805cb9cca80
[llvm-readobj] Add a flag to dump just the section-to-segment mapping.

Summary:
The following patch introduces a new function `printSectionMapping` which is responsible for dumping just the section-to-segment mapping.
This patch also introduces a n option `-section-mapping` that outputs that mapping without the program headers.

Previously, this functionality was controlled by `printProgramHeaders`, and the output from `-program-headers` has not been changed.  I am happy to change the option name, I copied  the name that was displayed when outputting the mapping table.

Reviewers: khemant, jhenderson, grimar, rupprecht

Reviewed By: jhenderson, grimar, rupprecht

Subscribers: rupprecht, jhenderson, llvm-commits

Differential Revision: https://reviews.llvm.org/D57365

llvm-svn: 352896
llvm/test/tools/llvm-readobj/gnu-phdrs.test
llvm/tools/llvm-readobj/ELFDumper.cpp
llvm/tools/llvm-readobj/ObjDumper.h
llvm/tools/llvm-readobj/llvm-readobj.cpp