tools: add support for decoding ARM attributes

Enhance the ARM specific parsing support in llvm-readobj to support attributes.
This allows for simpler tests to validate encoding of the build attributes as
specified in the ARM ELF specification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200450 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Saleem Abdulrasool
2014-01-30 04:46:33 +00:00
parent 7a38b33dec
commit 459c949777
9 changed files with 1121 additions and 0 deletions

View File

@@ -129,6 +129,12 @@ namespace opts {
// -codeview-linetables
cl::opt<bool> CodeViewLineTables("codeview-linetables",
cl::desc("Display CodeView line table information"));
// -arm-attributes, -a
cl::opt<bool> ARMAttributes("arm-attributes",
cl::desc("Display the ARM attributes section"));
cl::alias ARMAttributesShort("-a", cl::desc("Alias for --arm-attributes"),
cl::aliasopt(ARMAttributes));
} // namespace opts
static int ReturnValue = EXIT_SUCCESS;
@@ -227,6 +233,9 @@ static void dumpObject(const ObjectFile *Obj) {
Dumper->printNeededLibraries();
if (opts::ProgramHeaders)
Dumper->printProgramHeaders();
if (Obj->getArch() == llvm::Triple::arm && Obj->isELF())
if (opts::ARMAttributes)
Dumper->printAttributes();
}