diff options
author | Paul Brook <paul@codesourcery.com> | 2006-03-10 17:20:30 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2006-03-10 17:20:30 +0000 |
commit | 3a4a14e9ea1af8d2e5f0d54452be81ccc19c9a1a (patch) | |
tree | 3cfa9dff669c98c586c04a92614715c413fa6fa7 /bfd | |
parent | 0715c387841cb352734c8705c94260ba7b9b0040 (diff) | |
download | gdb-3a4a14e9ea1af8d2e5f0d54452be81ccc19c9a1a.zip gdb-3a4a14e9ea1af8d2e5f0d54452be81ccc19c9a1a.tar.gz gdb-3a4a14e9ea1af8d2e5f0d54452be81ccc19c9a1a.tar.bz2 |
2006-03-10 Paul Brook <paul@codesourcery.com>
bfd/
* elf32-arm.c (INTERWORK_FLAG): Handle EABIv5.
(elf32_arm_print_private_bfd_data): Ditto.
binutils/
* readelf.c (decode_ARM_machine_flags): Handle EABIv5.
gas/
* config/tc-arm.c (md_begin): Handle EABIv5.
(arm_eabis): Add EF_ARM_EABI_VER5.
* doc/c-arm.texi: Document -meabi=5.
include/elf/
* arm.h (EF_ARM_EABI_VER5): Define.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 27 |
2 files changed, 29 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4166c67..ac78ad6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2006-03-10 Paul Brook <paul@codesourcery.com> + + * elf32-arm.c (INTERWORK_FLAG): Handle EABIv5. + (elf32_arm_print_private_bfd_data): Ditto. + 2006-03-09 Paul Brook <paul@codesourcery.com> * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 21f17f0..784160a 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -1452,9 +1452,10 @@ elf32_arm_nabi_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) typedef unsigned long int insn32; typedef unsigned short int insn16; -/* In lieu of proper flags, assume all EABIv4 objects are interworkable. */ +/* In lieu of proper flags, assume all EABIv4 or later objects are + interworkable. */ #define INTERWORK_FLAG(abfd) \ - (EF_ARM_EABI_VERSION (elf_elfheader (abfd)->e_flags) == EF_ARM_EABI_VER4 \ + (EF_ARM_EABI_VERSION (elf_elfheader (abfd)->e_flags) >= EF_ARM_EABI_VER4 \ || (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK)) /* The linker script knows the section names for placement. @@ -5153,6 +5154,21 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) return TRUE; } + +/* Return TRUE if the two EABI versions are incompatible. */ + +static bfd_boolean +elf32_arm_versions_compatible (unsigned iver, unsigned over) +{ + /* v4 and v5 are the same spec before and after it was released, + so allow mixing them. */ + if ((iver == EF_ARM_EABI_VER4 && over == EF_ARM_EABI_VER5) + || (iver == EF_ARM_EABI_VER5 && over == EF_ARM_EABI_VER4)) + return TRUE; + + return (iver == over); +} + /* Merge backend specific data from an object file to the output object file when linking. */ @@ -5251,7 +5267,8 @@ elf32_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd) } /* Complain about various flag mismatches. */ - if (EF_ARM_EABI_VERSION (in_flags) != EF_ARM_EABI_VERSION (out_flags)) + if (!elf32_arm_versions_compatible (EF_ARM_EABI_VERSION (in_flags), + EF_ARM_EABI_VERSION (out_flags))) { _bfd_error_handler (_("ERROR: Source object %B has EABI version %d, but target %B has EABI version %d"), @@ -5462,7 +5479,11 @@ elf32_arm_print_private_bfd_data (bfd *abfd, void * ptr) case EF_ARM_EABI_VER4: fprintf (file, _(" [Version4 EABI]")); + goto eabi; + case EF_ARM_EABI_VER5: + fprintf (file, _(" [Version5 EABI]")); + eabi: if (flags & EF_ARM_BE8) fprintf (file, _(" [BE8]")); |