[BUG?] GCC 4.5.2 produces deprecated ARM relocation

Nick Clifton nickc@redhat.com
Wed Oct 26 12:11:00 GMT 2011


Hi Richard,

>> GCC is adding this suffix because the -fPIC flag enables NEED_PLT_RELOC
>> (see gcc/config/arm/elf.h).  Why elf.h is doing this I am not sure -
>> backwards compatibility maybe ?  Anyway it is GCC that needs fixing, not
>> GAS.

> I disagree, gas should just ignore the suffix when generating EABI
> conforming objects.

Well I based my conclusion upon this note in gas/doc/c-arm.texi:

    For compatibility with older toolchains the assembler
    also accepts @code{(PLT)} after branch targets.  This
    will generate the deprecated @samp{R_ARM_PLT32} relocation.

I do not mind enhancing the assembler however, so what do you think of 
the attached patch ?

Cheers
   Nick

gas/ChangeLog
2011-10-26  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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm.gas.plt32.patch
Type: text/x-diff
Size: 2671 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20111026/58a330c7/attachment.bin>


More information about the Binutils mailing list