* config/tc-arm.c (md_begin): Remove ARM_PLT32 reloc associated
authorNick Clifton <nickc@redhat.com>
Wed, 2 Nov 2011 11:13:59 +0000 (11:13 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 2 Nov 2011 11:13:59 +0000 (11:13 +0000)
with the (PLT) instruction suffix when operating in eabi mode.
* doc/c-arm.texi (ARM_Relocations): Extend description of (PLT)
suffix.

* gas/arm/pic.d: Update expected output.

gas/ChangeLog
gas/config/tc-arm.c
gas/doc/c-arm.texi
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/pic.d

index 9036a165566ede3f68cabe374df42d761b825f84..4778540f52ea3c67fb65c8319e401a42857fed57 100644 (file)
@@ -1,3 +1,10 @@
+2011-11-02  Nick Clifton  <nickc@redhat.com>
+
+       * config/tc-arm.c (md_begin): Remove ARM_PLT32 reloc associated
+       with the (PLT) instruction suffix when operating in eabi mode.
+       * doc/c-arm.texi (ARM_Relocations): Extend description of (PLT)
+       suffix.
+
 2011-11-01  DJ Delorie  <dj@redhat.com>
 
        * Makefile.am (TARGET_CPU_CFILES): Add tc-rl78.c.
index 38711644ecd8aa4eaa08fff09aeb96dddc0bb0d7..2ebb336649f4a941957dda873d7eee8be8ebbed8 100644 (file)
@@ -32,7 +32,7 @@
 #include "safe-ctype.h"
 #include "subsegs.h"
 #include "obstack.h"
-
+#include "libiberty.h"
 #include "opcode/arm.h"
 
 #ifdef OBJ_ELF
@@ -2054,6 +2054,7 @@ parse_neon_el_struct_list (char **str, unsigned *pbase,
    arm_reloc_hsh contains no entries, so this function can only
    succeed if there is no () after the word.  Returns -1 on error,
    BFD_RELOC_UNUSED if there wasn't any suffix.         */
+
 static int
 parse_reloc (char **str)
 {
@@ -22420,8 +22421,16 @@ md_begin (void)
     hash_insert (arm_barrier_opt_hsh, barrier_opt_names[i].template_name,
                 (void *) (barrier_opt_names + i));
 #ifdef OBJ_ELF
-  for (i = 0; i < sizeof (reloc_names) / sizeof (struct reloc_entry); i++)
-    hash_insert (arm_reloc_hsh, reloc_names[i].name, (void *) (reloc_names + i));
+  for (i = 0; i < ARRAY_SIZE (reloc_names); i++)
+    {
+      struct reloc_entry * entry = reloc_names + i;
+
+      if (arm_is_eabi() && entry->reloc == BFD_RELOC_ARM_PLT32)
+       /* This makes encode_branch() use the EABI versions of this relocation.  */
+       entry->reloc = BFD_RELOC_UNUSED;
+
+      hash_insert (arm_reloc_hsh, entry->name, (void *) entry);
+    }
 #endif
 
   set_constant_flonums ();
index 131f6ab5c09c2e518326cb0f487e7f30f0a292e5..e4c779de544d98d84b8dd4bd24a7607f43b18f8e 100644 (file)
@@ -493,8 +493,10 @@ and
 @code{TPOFF}.
 
 For compatibility with older toolchains the assembler also accepts
-@code{(PLT)} after branch targets.  This will generate the deprecated
-@samp{R_ARM_PLT32} relocation.
+@code{(PLT)} after branch targets.  On legacy targets this will
+generate the deprecated @samp{R_ARM_PLT32} relocation.  On EABI
+targets it will encode either the @samp{R_ARM_CALL} or
+@samp{R_ARM_JUMP24} relocation, as appropriate.
 
 @cindex MOVW and MOVT relocations, ARM
 Relocations for @samp{MOVW} and @samp{MOVT} instructions can be generated
index 2210cf5266199a85aec607316fb4c4fc564c053a..31436099f212af170467b1fc7c42936bf5aa1863 100644 (file)
@@ -1,3 +1,7 @@
+2011-11-02  Nick Clifton  <nickc@redhat.com>
+
+       * gas/arm/pic.d: Update expected output.
+
 2011-10-25  Joern Rennecke  <joern.rennecke@embecosm.com>
 
        * gas/epiphany: New directory.
index f5232a36992efbaa1477244706a83041897cbbcd..ac2a65d7e8ec5bd05b5c22190c66d2018f31e609 100644 (file)
@@ -13,7 +13,7 @@ Disassembly of section .text:
 00+0 <[^>]*> eb......  bl      00+. <[^>]*>
                        0: R_ARM_(PC24|CALL)    foo.*
 00+4 <[^>]*> eb......  bl      0[0123456789abcdef]+ <[^>]*>
-                       4: R_ARM_PLT32  foo
+                       4: R_ARM_(PLT32|CALL)   foo
        \.\.\.
                        8: R_ARM_ABS32  sym
                        c: R_ARM_GOT32  sym
This page took 0.044651 seconds and 4 git commands to generate.