aboutsummaryrefslogtreecommitdiff
path: root/test/Object
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 /test/Object
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 'test/Object')
-rw-r--r--test/Object/Inputs/arm-attributes.elf-armbin0 -> 1128 bytes
-rw-r--r--test/Object/Inputs/trivial-object-test.elf-armbin0 -> 662 bytes
-rw-r--r--test/Object/readobj-elf-arm-buildattrs.test46
3 files changed, 46 insertions, 0 deletions
diff --git a/test/Object/Inputs/arm-attributes.elf-arm b/test/Object/Inputs/arm-attributes.elf-arm
new file mode 100644
index 0000000000..69855d6ea0
--- /dev/null
+++ b/test/Object/Inputs/arm-attributes.elf-arm
Binary files differ
diff --git a/test/Object/Inputs/trivial-object-test.elf-arm b/test/Object/Inputs/trivial-object-test.elf-arm
new file mode 100644
index 0000000000..adfe96ca6a
--- /dev/null
+++ b/test/Object/Inputs/trivial-object-test.elf-arm
Binary files differ
diff --git a/test/Object/readobj-elf-arm-buildattrs.test b/test/Object/readobj-elf-arm-buildattrs.test
new file mode 100644
index 0000000000..e84570d72a
--- /dev/null
+++ b/test/Object/readobj-elf-arm-buildattrs.test
@@ -0,0 +1,46 @@
+RUN: llvm-readobj -arm-buildattrs %p/Inputs/trivial-object-test.elf-arm \
+RUN: | FileCheck %s -check-prefix=SMALL
+RUN: llvm-readobj -arm-buildattrs %p/Inputs/arm-attributes.elf-arm \
+RUN: | FileCheck %s -check-prefix=LARGE
+
+SMALL: ARMBuildAttributes {
+SMALL: Tag_CPU_name: Cortex-A8
+SMALL: Tag_CPU_arch: 10
+SMALL: Tag_ARM_ISA_use: 1
+SMALL: Tag_THUMB_ISA_use: 2
+SMALL: Tag_FP_arch: 3
+SMALL: Tag_Advanced_SIMD_arch: 1
+SMALL: Tag_ABI_FP_denormal: 1
+SMALL: Tag_ABI_FP_exceptions: 1
+SMALL: Tag_ABI_FP_number_model: 3
+SMALL: Tag_ABI_align8_needed: 1
+SMALL: Tag_ABI_align8_preserved: 1
+SMALL: Tag_ABI_HardFP_use: 3
+SMALL: Tag_ABI_VFP_args: 1
+SMALL: Tag_DIV_use: 1
+SMALL: Tag_Virtualization_use: 1
+
+LARGE: ARMBuildAttributes {
+LARGE: Tag_CPU_name: iwmmxt2
+LARGE: Tag_CPU_arch: 4
+LARGE: Tag_ARM_ISA_use: 1
+LARGE: Tag_THUMB_ISA_use: 1
+LARGE: Tag_WMMX_arch: 2
+LARGE: Tag_Advanced_SIMD_arch: 1
+LARGE: Tag_ABI_PCS_RW_data: 3
+LARGE: Tag_ABI_PCS_GOT_use: 2
+LARGE: Tag_ABI_PCS_wchar_t: 4
+LARGE: Tag_ABI_FP_rounding: 1
+LARGE: Tag_ABI_FP_denormal: 1
+LARGE: Tag_ABI_FP_exceptions: 1
+LARGE: Tag_ABI_FP_number_model: 3
+LARGE: Tag_ABI_align8_needed: 1
+LARGE: Tag_ABI_align8_preserved: 1
+LARGE: Tag_ABI_enum_size: 2
+LARGE: Tag_ABI_HardFP_use: 3
+LARGE: Tag_ABI_VFP_args: 1
+LARGE: Tag_ABI_optimization_goals: 1
+LARGE: Tag_CPU_unaligned_access: 1
+LARGE: Tag_FP_HP_extension: 1
+LARGE: Tag_DIV_use: 1
+LARGE: Tag_T2EE_use: 1