Teach llvm-readobj to print ELF program headers

llvm-svn: 179363
This commit is contained in:
Nico Rieck
2013-04-12 04:07:39 +00:00
parent e85c663f19
commit d6df0547fe
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();
}