aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-attrs.c
diff options
context:
space:
mode:
authorAndrew Stubbs <andrew.stubbs@st.com>2009-01-19 12:14:05 +0000
committerAndrew Stubbs <andrew.stubbs@st.com>2009-01-19 12:14:05 +0000
commit5aa6ff7ca4d5209dece43cf89fa5750f5dcaa033 (patch)
treeaf1aaeae14e0dbe24962fe72cd800af96678760b /bfd/elf-attrs.c
parent3483fe2e0bd83ee8dba72f73c6a309cae2d75e7e (diff)
downloadgdb-5aa6ff7ca4d5209dece43cf89fa5750f5dcaa033.zip
gdb-5aa6ff7ca4d5209dece43cf89fa5750f5dcaa033.tar.gz
gdb-5aa6ff7ca4d5209dece43cf89fa5750f5dcaa033.tar.bz2
2009-01-19 Andrew Stubbs <ams@codesourcery.com>
bfd/ * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering. * elf-bfd.h (elf_backend_data): Add obj_attrs_order. * elf32-arm.c (elf32_arm_obj_attrs_order): New function. (elf_backend_obj_attrs_order): New define. * elfxx-target.h (elf_backend_obj_attrs_order): New define. (elfNN_bed): Add elf_backend_obj_attrs_order. gas/testsuite/ * gas/arm/attr-order.d: New file. * gas/arm/attr-order.s: New file.
Diffstat (limited to 'bfd/elf-attrs.c')
-rw-r--r--bfd/elf-attrs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c
index 1e8076b..e60053b 100644
--- a/bfd/elf-attrs.c
+++ b/bfd/elf-attrs.c
@@ -189,7 +189,12 @@ vendor_set_obj_attr_contents (bfd *abfd, bfd_byte *contents, bfd_vma size,
attr = elf_known_obj_attributes (abfd)[vendor];
for (i = 4; i < NUM_KNOWN_OBJ_ATTRIBUTES; i++)
- p = write_obj_attribute (p, i, &attr[i]);
+ {
+ int tag = i;
+ if (get_elf_backend_data (abfd)->obj_attrs_order)
+ tag = get_elf_backend_data (abfd)->obj_attrs_order (i);
+ p = write_obj_attribute (p, tag, &attr[tag]);
+ }
for (list = elf_other_obj_attributes (abfd)[vendor];
list;