[patch] Arm EABI object attributes
Paul Brook
paul@codesourcery.com
Thu Sep 29 05:08:00 GMT 2005
The attached patch adds partial support for Arm EABI object attributes.
Partial because it only supports file scope attributes. Finer grained
(section/symbol level) attributes are currently ignored.
I've tried to connfine the knowledge of the file level format of this section
to bfd. My original implementation had gas create these sections manually,
but that ended up with significant amounts of duplication.
The majority of the testsuite changes are to squish spurious failures due to
the presence of the new section. There already seem to be similar hacks for
mips special sections, and I couldn't think of a better fix.
There are 4 new assembly directives. The first 3 (.cpu, .arch and .fpu) are
technically independent of this patch. They implement the equivalent of the
the -mcpu=, -march= and -mfpu= commandline options. Some changes were
necessary to make ".cpu all" (the default on many targets) mark the object
file based on the instructions actually user, rather than marking it as being
for the most advanced CPU we know about.
The .eabi_attribute allows the user to add specific tags to an object.
Ok?
Comments/suggestions?
Paul
2005-09-28 Paul Brook <paul@codesourcery.com>
bfd/
* elf32-arm.c: Move #include "elf/arm.x" after libbfd.h.
(elf32_arm_obj_tdata): Add eabi_attributes.
(uleb128_size, elf32_arm_eabi_attr_size, write_uleb128,
elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
elf32_arm_new_eabi_attr, elf32_arm_add_eabi_attr_int,
elf32_arm_add_eabi_attr_compat, elf32_arm_find_eabi_attr,
elf32_arm_merge_eabi_attributes): New functions.
(elf32_arm_copy_private_bfd_data): Copy EABI object attributes.
gas/
* config/tc-arm.c: Don't provide fallback default for CPU_DEFAULT.
(arm_arch_used, thumb_arch_used, selected_cpu, selected_cpu_name):
New variables.
(s_arm_eabi_attribute, s_arm_arch, s_arm_cpu, s_arm_fpu,
aeabi_set_public_attributes, arm_md_end): New functions.
(md_pseudo_table): Add "cpu", "arch", "fpu" and "eabi_attribute".
(md_assemble): Set thumb_arch_used and arm_arch_used.
(md_begin): Set defaut cpu if CPU_DEFAULT not defined.
* config/tc-arm.h (md_end): Define.
* doc/c-arm.texi: Document .cpu, .arch, .fpu and .eabi_attribute.
gas/testsuite/
* gas/arm/arm7t.d: Only disassemble code sections.
* gas/arm/bignum1.d: Ignore Arm object attribute sections.
* gas/arm/mapping.d: Ditto.
* gas/arm/unwind.d: Ditto.
* gas/elf/section0.d: Ditto.
* gas/elf/section1.d: Ditto.
* gas/elf/elf.exp: Set target_machine for Arm EABI based targets.
* gas/elf/section2.e-armeabi: New file.
include/elf/
* arm.h: Add prototypes for BFD object attribute routines.
ld/testsuite/
* ld-arm/arm-rel31.d: Ignore Arm object attribute sections.
* ld-arm/arm-target1-abs.d: Ditto.
* ld-arm/arm-target1-rel.d: Ditto.
* ld-arm/arm-target2-abs.d: Ditto.
* ld-arm/arm-target2-got-rel.d: Ditto.
* ld-arm/arm-target2-rel.d: Ditto.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.eabi_attr
Type: text/x-diff
Size: 40643 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20050929/c51e8087/attachment.bin>
More information about the Binutils
mailing list