Index: gas/config/tc-arm.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-arm.c,v retrieving revision 1.502 diff -u -3 -p -r1.502 tc-arm.c --- gas/config/tc-arm.c 18 Oct 2011 14:41:53 -0000 1.502 +++ gas/config/tc-arm.c 26 Oct 2011 12:03:34 -0000 @@ -32,7 +32,7 @@ #include "safe-ctype.h" #include "subsegs.h" #include "obstack.h" - +#include "libiberty.h" #include "opcode/arm.h" #ifdef OBJ_ELF @@ -22420,8 +22422,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: gas/doc/c-arm.texi =================================================================== RCS file: /cvs/src/src/gas/doc/c-arm.texi,v retrieving revision 1.85 diff -u -3 -p -r1.85 c-arm.texi --- gas/doc/c-arm.texi 31 May 2011 14:12:54 -0000 1.85 +++ gas/doc/c-arm.texi 26 Oct 2011 12:03:34 -0000 @@ -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: gas/testsuite/gas/arm/pic.d =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/arm/pic.d,v retrieving revision 1.15 diff -u -3 -p -r1.15 pic.d --- gas/testsuite/gas/arm/pic.d 7 Mar 2006 08:39:21 -0000 1.15 +++ gas/testsuite/gas/arm/pic.d 26 Oct 2011 12:03:34 -0000 @@ -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