From: Nick Clifton Date: Wed, 2 Nov 2011 11:13:59 +0000 (+0000) Subject: * config/tc-arm.c (md_begin): Remove ARM_PLT32 reloc associated X-Git-Tag: gdb_7_4-2011-12-13-branchpoint~372 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3da1d841a1e0a8d5dcc6d41176c65ee7698982c8;p=external%2Fbinutils.git * 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. * gas/arm/pic.d: Update expected output. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 9036a16..4778540 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2011-11-02 Nick Clifton + + * 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 * Makefile.am (TARGET_CPU_CFILES): Add tc-rl78.c. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 3871164..2ebb336 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -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 (); diff --git a/gas/doc/c-arm.texi b/gas/doc/c-arm.texi index 131f6ab..e4c779d 100644 --- a/gas/doc/c-arm.texi +++ b/gas/doc/c-arm.texi @@ -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 diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 2210cf5..3143609 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-11-02 Nick Clifton + + * gas/arm/pic.d: Update expected output. + 2011-10-25 Joern Rennecke * gas/epiphany: New directory. diff --git a/gas/testsuite/gas/arm/pic.d b/gas/testsuite/gas/arm/pic.d index f5232a3..ac2a65d 100644 --- a/gas/testsuite/gas/arm/pic.d +++ b/gas/testsuite/gas/arm/pic.d @@ -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