From: "Joseph S. Myers" <joseph@codesourcery.com>
To: binutils@sourceware.org
Subject: Fix ARM EABI attribute merging
Date: Sun, 24 Jun 2007 18:14:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.0706241810300.13777@digraph.polyomino.org.uk> (raw)
This patch fixes a problem with the ARM EABI attribute merging whereby
merged attributes didn't end up in the output file. Tested with cross to
arm-none-eabi; OK to commit?
(This is preliminary to making to attributes support generic to all ELF
targets as I proposed in
<http://sourceware.org/ml/binutils/2007-06/msg00156.html>; I'd like to
keep this bugfix separate from the much larger patch making the code
generic.)
bfd:
2007-06-24 Joseph Myers <joseph@codesourcery.com>
* elf32-arm.c (copy_eabi_attributes): Copy type of attributes.
ld/testsuite:
2007-06-24 Joseph Myers <joseph@codesourcery.com>
* ld-arm/attr-merge.s, ld-arm/attr-merge.attr: New.
* ld-arm/arm-elf.exp (armelftests): Add new test.
diff -rupN binutils-mainline/bfd/elf32-arm.c binutils-mainline-fix1/bfd/elf32-arm.c
--- binutils-mainline/bfd/elf32-arm.c 2007-05-22 17:17:53.000000000 +0000
+++ binutils-mainline-fix1/bfd/elf32-arm.c 2007-06-19 20:25:20.000000000 +0000
@@ -6969,6 +6969,7 @@ copy_eabi_attributes (bfd *ibfd, bfd *ob
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 -rupN binutils-mainline/ld/testsuite/ld-arm/arm-elf.exp binutils-mainline-fix1/ld/testsuite/ld-arm/arm-elf.exp
--- binutils-mainline/ld/testsuite/ld-arm/arm-elf.exp 2007-05-21 06:36:01.000000000 +0000
+++ binutils-mainline-fix1/ld/testsuite/ld-arm/arm-elf.exp 2007-06-19 20:25:52.000000000 +0000
@@ -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 -rupN binutils-mainline/ld/testsuite/ld-arm/attr-merge.attr binutils-mainline-fix1/ld/testsuite/ld-arm/attr-merge.attr
--- binutils-mainline/ld/testsuite/ld-arm/attr-merge.attr 1970-01-01 00:00:00.000000000 +0000
+++ binutils-mainline-fix1/ld/testsuite/ld-arm/attr-merge.attr 2007-06-19 20:25:19.000000000 +0000
@@ -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 -rupN binutils-mainline/ld/testsuite/ld-arm/attr-merge.s binutils-mainline-fix1/ld/testsuite/ld-arm/attr-merge.s
--- binutils-mainline/ld/testsuite/ld-arm/attr-merge.s 1970-01-01 00:00:00.000000000 +0000
+++ binutils-mainline-fix1/ld/testsuite/ld-arm/attr-merge.s 2007-06-19 20:25:19.000000000 +0000
@@ -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"
--
Joseph S. Myers
joseph@codesourcery.com
next reply other threads:[~2007-06-24 18:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-24 18:14 Joseph S. Myers [this message]
2007-06-26 13:38 ` Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0706241810300.13777@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).