From 3d3e6f9a7c84090b7955feddb458bab21314714d Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 26 Jun 2007 13:55:04 +0000 Subject: [PATCH] bfd: * elf32-arm.c (copy_eabi_attributes): Copy type of attributes. ld/testsuite: * ld-arm/attr-merge.s, ld-arm/attr-merge.attr: New. * ld-arm/arm-elf.exp (armelftests): Add new test. --- bfd/ChangeLog | 4 ++++ bfd/elf32-arm.c | 1 + ld/testsuite/ChangeLog | 5 +++++ ld/testsuite/ld-arm/arm-elf.exp | 3 +++ ld/testsuite/ld-arm/attr-merge.attr | 12 ++++++++++++ ld/testsuite/ld-arm/attr-merge.s | 11 +++++++++++ 6 files changed, 36 insertions(+) create mode 100644 ld/testsuite/ld-arm/attr-merge.attr create mode 100644 ld/testsuite/ld-arm/attr-merge.s diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6b396db05f0..a18f205bb9b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2007-06-26 Joseph Myers + + * elf32-arm.c (copy_eabi_attributes): Copy type of attributes. + 2007-06-25 Richard Sandiford * elfxx-mips.c (mips_elf_calculate_relocation): Allow local stubs diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 6c85e526056..bf4f49f5f6a 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -6969,6 +6969,7 @@ copy_eabi_attributes (bfd *ibfd, bfd *obfd) out_attr = &elf32_arm_tdata (obfd)->known_eabi_attributes[4]; for (i = 4; i < NUM_KNOWN_ATTRIBUTES; i++) { + out_attr->type = in_attr->type; out_attr->i = in_attr->i; if (in_attr->s && *in_attr->s) out_attr->s = attr_strdup (obfd, in_attr->s); diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index e3e557e878c..42f00b04db9 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-06-26 Joseph Myers + + * ld-arm/attr-merge.s, ld-arm/attr-merge.attr: New. + * ld-arm/arm-elf.exp (armelftests): Add new test. + 2007-06-25 Richard Sandiford * ld-mips-elf/mips16-local-stubs-1.s, diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index af4921e02d1..087225f2e10 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -167,6 +167,9 @@ set armelftests { {"jump19" "-static -T arm.ld" "" {jump19.s} {{objdump -dr jump19.d}} "jump19"} + {"EABI attribute merging" "-r" "" {attr-merge.s attr-merge.s} + {{readelf -A attr-merge.attr}} + "attr-merge"} } run_ld_link_tests $armelftests diff --git a/ld/testsuite/ld-arm/attr-merge.attr b/ld/testsuite/ld-arm/attr-merge.attr new file mode 100644 index 00000000000..341e6d1e412 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge.attr @@ -0,0 +1,12 @@ +Attribute Section: aeabi +File Attributes + Tag_CPU_name: "ARM7TDMI" + Tag_CPU_arch: v4T + Tag_ABI_PCS_wchar_t: 4 + Tag_ABI_FP_denormal: Needed + Tag_ABI_FP_exceptions: Needed + Tag_ABI_FP_number_model: IEEE 754 + Tag_ABI_align8_needed: Yes + Tag_ABI_align8_preserved: Yes, except leaf SP + Tag_ABI_enum_size: small + Tag_ABI_optimization_goals: Aggressive Debug diff --git a/ld/testsuite/ld-arm/attr-merge.s b/ld/testsuite/ld-arm/attr-merge.s new file mode 100644 index 00000000000..b56f6e32d6e --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge.s @@ -0,0 +1,11 @@ + .cpu arm7tdmi + .fpu softvfp + .eabi_attribute 20, 1 + .eabi_attribute 21, 1 + .eabi_attribute 23, 3 + .eabi_attribute 24, 1 + .eabi_attribute 25, 1 + .eabi_attribute 26, 1 + .eabi_attribute 30, 6 + .eabi_attribute 18, 4 + .file "attr-merge.s" -- 2.30.2