[Object][ELF] Support dumping hash-tables from files with no section table.

This time without breaking the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241869 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael J. Spencer
2015-07-09 22:32:24 +00:00
parent ad6702ec23
commit 8109763d68
8 changed files with 102 additions and 27 deletions

View File

@ -127,6 +127,10 @@ namespace opts {
cl::opt<bool> ProgramHeaders("program-headers",
cl::desc("Display ELF program headers"));
// -hash-table
cl::opt<bool> HashTable("hash-table",
cl::desc("Display ELF hash table"));
// -expand-relocs
cl::opt<bool> ExpandRelocs("expand-relocs",
cl::desc("Expand each shown relocation to multiple lines"));
@ -300,6 +304,8 @@ static void dumpObject(const ObjectFile *Obj) {
Dumper->printNeededLibraries();
if (opts::ProgramHeaders)
Dumper->printProgramHeaders();
if (opts::HashTable)
Dumper->printHashTable();
if (Obj->getArch() == llvm::Triple::arm && Obj->isELF())
if (opts::ARMAttributes)
Dumper->printAttributes();