OSDN Git Service

* config/tc-arm.c (md_begin): Remove ARM_PLT32 reloc associated
authornickc <nickc>
Wed, 2 Nov 2011 11:13:57 +0000 (11:13 +0000)
committernickc <nickc>
Wed, 2 Nov 2011 11:13:57 +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 9036a16..4778540 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 3871164..2ebb336 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 131f6ab..e4c779d 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 2210cf5..3143609 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 f5232a3..ac2a65d 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