* bfd/elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
authorPaul Brook <paul@codesourcery.com>
Tue, 23 Mar 2004 23:05:52 +0000 (23:05 +0000)
committerPaul Brook <paul@codesourcery.com>
Tue, 23 Mar 2004 23:05:52 +0000 (23:05 +0000)
* binutils/readelf.c (decode_ARM_machine_flags): Add EABI v3.
* gas/config/tc-arm.c (meabi_flags): New variable.
(arm_parse_eabi): New function.
(md_begin): Set flags for EABI v3.
(arm_eabis): Add.
(arm_long_opts): Add meabi.
* include/elf/arm.h (EF_ERM_BE8, EF_ARM_LE8, EF_ARM_EABI_VER3): Add.
* doc/as.texinf <ARM>: Document -meabi.
* doc/c-arm.texi: Ditto.

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

index dac6564204abc9d5cc25d63413deceff0497014d..6560ebc5d1bb62ce22fb6af4d73e4243723040c7 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-23  Paul Brook  <paul@codesourcery.com>
+
+       * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
+
 2004-03-22  Bob Wilson  <bob.wilson@acm.org>
 
        * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
index 2f6c22e276522cc7e80fc3dea26df7cb2bb17c94..33f85bd609a690b0cff7572a264ba85ffd21fdd1 100644 (file)
@@ -2679,6 +2679,18 @@ elf32_arm_print_private_bfd_data (abfd, ptr)
                 | EF_ARM_MAPSYMSFIRST);
       break;
 
+    case EF_ARM_EABI_VER3:
+      fprintf (file, _(" [Version3 EABI]"));
+
+      if (flags & EF_ARM_BE8)
+       fprintf (file, _(" [BE8]"));
+
+      if (flags & EF_ARM_LE8)
+       fprintf (file, _(" [LE8]"));
+
+      flags &= ~(EF_ARM_LE8 | EF_ARM_BE8);
+      break;
+
     default:
       fprintf (file, _(" <EABI version unrecognised>"));
       break;
index 2e41bc8b5012c3e572596441f1e09e3e3bf896ff..94d368c37bb1ea2913bdb1888328f08d9e9bca1e 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-23  Paul Brook  <paul@codesourcery.com>
+
+       * readelf.c (decode_ARM_machine_flags): Add EABI v3.
+
 2004-03-21  Richard Henderson  <rth@redhat.com>
 
        * readelf.c (display_debug_frames): Don't crash for mismatched
index 3561eff0a6eb915372dc99bd3777c4cd51a57b5d..c8d6ad902fa9e714a93e24a5b0f351de43ba4315 100644 (file)
@@ -1740,6 +1740,33 @@ decode_ARM_machine_flags (unsigned e_flags, char buf[])
        }
       break;
 
+    case EF_ARM_EABI_VER3:
+      strcat (buf, ", Version3 EABI");
+      while (e_flags)
+       {
+         unsigned flag;
+
+         /* Process flags one bit at a time.  */
+         flag = e_flags & - e_flags;
+         e_flags &= ~ flag;
+
+         switch (flag)
+           {
+           case EF_ARM_BE8:
+             strcat (buf, ", BE8");
+             break;
+
+           case EF_ARM_LE8:
+             strcat (buf, ", LE8");
+             break;
+
+           default:
+             unknown = 1;
+             break;
+           }
+       }
+      break;
+
     case EF_ARM_EABI_UNKNOWN:
       strcat (buf, ", GNU EABI");
       while (e_flags)
index ec4e566f315346475e42e39940919e7ab477bdbb..f96a82883cf18326af5b5a58f5c4abe0fabc4ae7 100644 (file)
@@ -1,3 +1,13 @@
+2004-03-23  Paul Brook  <paul@codesourcery.com>
+
+       * config/tc-arm.c (meabi_flags): New variable.
+       (arm_parse_eabi): New function.
+       (md_begin): Set flags for EABI v3.
+       (arm_eabis): Add.
+       (arm_long_opts): Add meabi.
+       * doc/as.texinf <ARM>: Document -meabi.
+       * doc/c-arm.texi: Ditto.
+
 2004-03-22  Bob Wilson  <bob.wilson@acm.org>
 
        * config/tc-xtensa.c (xtensa_post_relax_hook): Create literal
index 69b2c21998a38e6cc36f854be91eb00d501a1bd6..bcf57692d13b96c2ab03954f4e923a54be3b380c 100644 (file)
@@ -191,6 +191,7 @@ static int march_cpu_opt = -1;
 static int march_fpu_opt = -1;
 static int mfpu_opt = -1;
 static int mfloat_abi_opt = -1;
+static int meabi_flags = EF_ARM_EABI_UNKNOWN;
 
 /* This array holds the chars that always start a comment.  If the
    pre-processor is disabled, these aren't very useful.  */
@@ -2551,6 +2552,7 @@ static int arm_parse_cpu PARAMS ((char *));
 static int arm_parse_arch PARAMS ((char *));
 static int arm_parse_fpu PARAMS ((char *));
 static int arm_parse_float_abi PARAMS ((char *));
+static int arm_parse_eabi PARAMS ((char *));
 #if 0 /* Suppressed - for now.  */
 #if defined OBJ_COFF || defined OBJ_ELF
 static void arm_add_note PARAMS ((const char *, const char *, unsigned int));
@@ -11687,37 +11689,49 @@ md_begin ()
 
 #if defined OBJ_COFF || defined OBJ_ELF
   {
-    unsigned int flags = 0;
-
-    /* Set the flags in the private structure.  */
-    if (uses_apcs_26)      flags |= F_APCS26;
-    if (support_interwork) flags |= F_INTERWORK;
-    if (uses_apcs_float)   flags |= F_APCS_FLOAT;
-    if (pic_code)          flags |= F_PIC;
-    if ((cpu_variant & FPU_ANY) == FPU_NONE
-        || (cpu_variant & FPU_ANY) == FPU_ARCH_VFP) /* VFP layout only.  */
-      {
-       flags |= F_SOFT_FLOAT;
-      }
-    switch (mfloat_abi_opt)
+    unsigned int flags = meabi_flags;
+
+    switch (meabi_flags)
       {
-      case ARM_FLOAT_ABI_SOFT:
-      case ARM_FLOAT_ABI_SOFTFP:
-       flags |= F_SOFT_FLOAT;
-       break;
+      case EF_ARM_EABI_UNKNOWN:
+       /* Set the flags in the private structure.  */
+       if (uses_apcs_26)      flags |= F_APCS26;
+       if (support_interwork) flags |= F_INTERWORK;
+       if (uses_apcs_float)   flags |= F_APCS_FLOAT;
+       if (pic_code)          flags |= F_PIC;
+       if ((cpu_variant & FPU_ANY) == FPU_NONE
+            || (cpu_variant & FPU_ANY) == FPU_ARCH_VFP) /* VFP layout only.  */
+         {
+           flags |= F_SOFT_FLOAT;
+         }
+       switch (mfloat_abi_opt)
+         {
+         case ARM_FLOAT_ABI_SOFT:
+         case ARM_FLOAT_ABI_SOFTFP:
+           flags |= F_SOFT_FLOAT;
+           break;
 
-      case ARM_FLOAT_ABI_HARD:
-       if (flags & F_SOFT_FLOAT)
-         as_bad (_("hard-float conflicts with specified fpu"));
-       break;
-      }
-    /* Using VFP conventions (even if soft-float).  */
-    if (cpu_variant & FPU_VFP_EXT_NONE) flags |= F_VFP_FLOAT;
+         case ARM_FLOAT_ABI_HARD:
+           if (flags & F_SOFT_FLOAT)
+             as_bad (_("hard-float conflicts with specified fpu"));
+           break;
+         }
+       /* Using VFP conventions (even if soft-float).  */
+       if (cpu_variant & FPU_VFP_EXT_NONE) flags |= F_VFP_FLOAT;
 
 #if defined OBJ_ELF
-    if (cpu_variant & FPU_ARCH_MAVERICK)
-       flags |= EF_ARM_MAVERICK_FLOAT;
+       if (cpu_variant & FPU_ARCH_MAVERICK)
+           flags |= EF_ARM_MAVERICK_FLOAT;
 #endif
+       break;
+
+      case EF_ARM_EABI_VER3:
+       /* No additional flags to set.  */
+       break;
+
+      default:
+       abort ();
+      }
 
     bfd_set_private_flags (stdoutput, flags);
 
@@ -13450,6 +13464,20 @@ static struct arm_float_abi_option_table arm_float_abis[] =
   {NULL, 0}
 };
 
+struct arm_eabi_option_table
+{
+  char *name;
+  unsigned int value;
+};
+
+/* We only know hot to output GNU and ver 3 (AAELF) formats.  */
+static struct arm_eabi_option_table arm_eabis[] =
+{
+  {"gnu",      EF_ARM_EABI_UNKNOWN},
+  {"3",                EF_ARM_EABI_VER3},
+  {NULL, 0}
+};
+
 struct arm_long_option_table
 {
   char *option;                /* Substring to match.  */
@@ -13613,6 +13641,22 @@ arm_parse_float_abi (str)
   return 0;
 }
 
+static int
+arm_parse_eabi (str)
+     char * str;
+{
+  struct arm_eabi_option_table *opt;
+
+  for (opt = arm_eabis; opt->name != NULL; opt++)
+    if (strcmp (opt->name, str) == 0)
+      {
+       meabi_flags = opt->value;
+       return 1;
+      }
+  as_bad (_("unknown EABI `%s'\n"), str);
+  return 0;
+}
+
 struct arm_long_option_table arm_long_opts[] =
 {
   {"mcpu=", N_("<cpu name>\t  assemble for CPU <cpu name>"),
@@ -13623,6 +13667,8 @@ struct arm_long_option_table arm_long_opts[] =
    arm_parse_fpu, NULL},
   {"mfloat-abi=", N_("<abi>\t  assemble for floating point ABI <abi>"),
    arm_parse_float_abi, NULL},
+  {"meabi=", N_("<ver>\t  assemble for eabi version <ver>"),
+   arm_parse_eabi, NULL},
   {NULL, NULL, 0, NULL}
 };
 
index d9d23dff59f4a9f17b7ad822a270bf651ec0984a..fc02bb729d32b38cafc0e71d01d4faa9ed021d2d 100644 (file)
@@ -263,6 +263,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
    [@b{-march}=@var{architecture}[+@var{extension}@dots{}]]
    [@b{-mfpu}=@var{floating-point-format}]
    [@b{-mfloat-abi}=@var{abi}]
+   [@b{-meabi}=@var{ver}]
    [@b{-mthumb}]
    [@b{-EB}|@b{-EL}]
    [@b{-mapcs-32}|@b{-mapcs-26}|@b{-mapcs-float}|
index 23cd7bb3fef61e9d2512c6409150a2c592395afa..e871d2821b2ce80b8f27767e6c2e877ad1dbe867 100644 (file)
@@ -228,6 +228,15 @@ The following values are recognized:
 and
 @code{hard}.
 
+@cindex @code{-eabi=} command line option, ARM
+@item -meabi=@var{ver}
+This option specifies which EABI version the produced object files should
+conform to.
+The following values are recognised:
+@code{gnu}
+and
+@code{3}.
+
 @cindex @code{-EB} command line option, ARM
 @item -EB
 This option specifies that the output generated by the assembler should
index 6e4d604b2d0136bd5f6813c8697e82f45df86109..385b857e38498a7aa5a3ef1e4e263f6437a7b88e 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-23  Paul Brook  <paul@codesourcery.com>
+
+       * arm.h (EF_ERM_BE8, EF_ARM_LE8, EF_ARM_EABI_VER3): Add.
+
 2003-03-03  Andrew Stubbs  <andrew.stubbs@superh.com>
 
        * sh.h: Add EF_SH4_NOMMU_NOFPU.
index 181a9f0c5c92f8666fbb1ed1783dcb90e4582f34..158a4b55e4f2ca316dd68d7adc889f9852b65ff9 100644 (file)
 #define EF_ARM_MAPSYMSFIRST 0x10       /* NB conflicts with EF_APCS_FLOAT */
 #define EF_ARM_EABIMASK      0xFF000000
 
+/* Constants defined in AAELF.  */
+#define EF_ARM_BE8         0x00800000
+#define EF_ARM_LE8         0x00400000
+
 #define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
 #define EF_ARM_EABI_UNKNOWN  0x00000000
 #define EF_ARM_EABI_VER1     0x01000000
 #define EF_ARM_EABI_VER2     0x02000000
+#define EF_ARM_EABI_VER3     0x03000000
 
 /* Local aliases for some flags to match names used by COFF port.  */
 #define F_INTERWORK       EF_ARM_INTERWORK
This page took 0.044734 seconds and 4 git commands to generate.