]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2006-03-10 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Fri, 10 Mar 2006 17:20:30 +0000 (17:20 +0000)
committerPaul Brook <paul@codesourcery.com>
Fri, 10 Mar 2006 17:20:30 +0000 (17:20 +0000)
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.

bfd/ChangeLog
bfd/elf32-arm.c
binutils/ChangeLog
binutils/readelf.c
gas/ChangeLog
gas/config/tc-arm.c
gas/doc/c-arm.texi
include/elf/ChangeLog
include/elf/arm.h

index 4166c678b52850fd7da0b6f4caa2e6b503f22478..ac78ad60046abcb160db68941d8c84bac0b20e34 100644 (file)
@@ -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
index 21f17f07a622dcf729f58a559b7e0c731125c67f..784160a2634ab673c6dcb5d905100d506d47e81f 100644 (file)
@@ -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]"));
 
index 1281c4a1aa4105baedf96df89f6d335a4649238b..21378d7de8c23557a442936a7b79bc2f66c29528 100644 (file)
@@ -1,3 +1,7 @@
+2006-03-10  Paul Brook  <paul@codesourcery.com>
+
+       * readelf.c (decode_ARM_machine_flags):  Handle EABIv5.
+
 2006-03-10  Alan Modra  <amodra@bigpond.net.au>
 
        * dwarf.c (process_extended_line_op): Remove pointer_size param.
index dcd02bca218b0594744e0bb156c064184740cb55..d8bd54f440f316b67b6acc328d7ab4285f8faf5e 100644 (file)
@@ -1793,6 +1793,11 @@ decode_ARM_machine_flags (unsigned e_flags, char buf[])
 
     case EF_ARM_EABI_VER4:
       strcat (buf, ", Version4 EABI");
+      goto eabi;
+
+    case EF_ARM_EABI_VER5:
+      strcat (buf, ", Version5 EABI");
+    eabi:
       while (e_flags)
        {
          unsigned flag;
index ac85baef355a01b7a1f379d9f435f6bcdb3933de..1b72e39dc7f22cf8bf4c930ab000a6e715b0bdb8 100644 (file)
@@ -1,3 +1,9 @@
+2006-03-10  Paul Brook  <paul@codesourcery.com>
+
+       * config/tc-arm.c (md_begin): Handle EABIv5.
+       (arm_eabis): Add EF_ARM_EABI_VER5.
+       * doc/c-arm.texi: Document -meabi=5.
+
 2006-03-10  Ben Elliston  <bje@au.ibm.com>
 
        * app.c (do_scrub_chars): Simplify string handling.
index e98733d6dd09641fb3758f33dea9f378765a034e..cab398f486e87671be3b5fcf5721746b48d2d839 100644 (file)
@@ -12851,6 +12851,7 @@ md_begin (void)
        break;
 
       case EF_ARM_EABI_VER4:
+      case EF_ARM_EABI_VER5:
        /* No additional flags to set.  */
        break;
 
@@ -13367,11 +13368,12 @@ static const struct arm_option_value_table arm_float_abis[] =
 };
 
 #ifdef OBJ_ELF
-/* We only know how to output GNU and ver 4 (AAELF) formats.  */
+/* We only know how to output GNU and ver 4/5 (AAELF) formats.  */
 static const struct arm_option_value_table arm_eabis[] =
 {
   {"gnu",      EF_ARM_EABI_UNKNOWN},
   {"4",                EF_ARM_EABI_VER4},
+  {"5",                EF_ARM_EABI_VER5},
   {NULL,       0}
 };
 #endif
index 299dc42bacdcc2945847ec9f4af29f824e7d6395..ca0998bea669c8e7a5cf2b632e55f3f9f042e1db 100644 (file)
@@ -255,9 +255,10 @@ and
 This option specifies which EABI version the produced object files should
 conform to.
 The following values are recognised:
-@code{gnu}
+@code{gnu},
+@code{4}
 and
-@code{4}.
+@code{5}.
 
 @cindex @code{-EB} command line option, ARM
 @item -EB
index 3270871cd29a785d1eaa9bbae61ae1edb0dbcb9d..5367181a4970246419e694fb6d4b267849d78157 100644 (file)
@@ -1,3 +1,7 @@
+2006-03-10  Paul Brook  <paul@codesourcery.com>
+
+       * arm.h (EF_ARM_EABI_VER5): Define.
+
 2006-03-06  Nathan Sidwell  <nathan@codesourcery.com>
 
        * m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A,
index 9ad04205c64f58c7b44ef71e00a0290c48bc257e..8311c131c99c08cd282a4b2bb18e8c57cdbb420d 100644 (file)
@@ -56,6 +56,7 @@
 #define EF_ARM_EABI_VER2     0x02000000
 #define EF_ARM_EABI_VER3     0x03000000
 #define EF_ARM_EABI_VER4     0x04000000
+#define EF_ARM_EABI_VER5     0x05000000
 
 /* Local aliases for some flags to match names used by COFF port.  */
 #define F_INTERWORK       EF_ARM_INTERWORK