summaryrefslogtreecommitdiff
path: root/tools/llvm-readobj/llvm-readobj.cpp
diff options
context:
space:
mode:
authorAmara Emerson <amara.emerson@arm.com>2013-05-03 11:36:35 +0000
committerAmara Emerson <amara.emerson@arm.com>2013-05-03 11:36:35 +0000
commit5d446e61d992f105a05aade62d5305fd8a346081 (patch)
tree397251bdb3b58c7cbe7a93b1885cc2f77d3c058e /tools/llvm-readobj/llvm-readobj.cpp
parent820b3fd7716cf5ab26961d1b2b21fd5d0f330fe1 (diff)
Add support for reading ARM ELF build attributes.
Build attribute sections can now be read if they exist via ELFObjectFile, and the llvm-readobj tool has been extended with an option to dump this information if requested. Regression tests are also included which exercise these features. Also update the docs with a fixed ARM ABI link and a new link to the Addenda which provides the build attributes specification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-readobj/llvm-readobj.cpp')
-rw-r--r--tools/llvm-readobj/llvm-readobj.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/llvm-readobj/llvm-readobj.cpp b/tools/llvm-readobj/llvm-readobj.cpp
index 2e95b6b5518..d5eb85429c2 100644
--- a/tools/llvm-readobj/llvm-readobj.cpp
+++ b/tools/llvm-readobj/llvm-readobj.cpp
@@ -128,6 +128,10 @@ namespace opts {
// -expand-relocs
cl::opt<bool> ExpandRelocs("expand-relocs",
cl::desc("Expand each shown relocation to multiple lines"));
+
+ // -arm-buildattrs
+ cl::opt<bool> ArmBuildAttrs("arm-buildattrs",
+ cl::desc("Display ARM ELF build attributes"));
} // namespace opts
namespace llvm {
@@ -221,6 +225,8 @@ static void dumpObject(const ObjectFile *Obj) {
Dumper->printNeededLibraries();
if (opts::ProgramHeaders)
Dumper->printProgramHeaders();
+ if (opts::ArmBuildAttrs)
+ Dumper->printARMBuildAttributes();
}