Teach llvm-readobj to print ELF program headers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179363 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nico Rieck
2013-04-12 04:07:39 +00:00
parent 7e87373e91
commit cf3b55ab18
5 changed files with 136 additions and 5 deletions

View File

@ -121,6 +121,10 @@ namespace opts {
cl::opt<bool> NeededLibraries("needed-libs",
cl::desc("Display the needed libraries"));
// -program-headers
cl::opt<bool> ProgramHeaders("program-headers",
cl::desc("Display ELF program headers"));
// -expand-relocs
cl::opt<bool> ExpandRelocs("expand-relocs",
cl::desc("Expand each shown relocation to multiple lines"));
@ -215,6 +219,8 @@ static void dumpObject(const ObjectFile *Obj) {
Dumper->printDynamicTable();
if (opts::NeededLibraries)
Dumper->printNeededLibraries();
if (opts::ProgramHeaders)
Dumper->printProgramHeaders();
}