This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [BUG?] GCC 4.5.2 produces deprecated ARM relocation
- From: Ben Gamari <bgamari dot foss at gmail dot com>
- To: "gcc\ at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Cc: Nick Clifton <nickc at redhat dot com>, Richard Earnshaw <rearnsha at arm dot com>
- Date: Tue, 25 Oct 2011 09:49:59 -0400
- Subject: Re: [BUG?] GCC 4.5.2 produces deprecated ARM relocation
- References: <87lisglw3i.fsf@gmail.com> <4EA57E62.8020802@redhat.com>
On Mon, 24 Oct 2011 16:04:02 +0100, Nick Clifton <nickc@redhat.com> wrote:
> Hi Ben,
>
> > To my
> > surprise, I found that the compiler instead[2] produced the deprecated
> > R_ARM_PLT32 relocation. Considering the deprecated state of this
> > relocation type, should this be considered a bug?
>
> Yes...
>
> > Being a linker
> > implementer, I for one would greatly appreciate it if GCC tried to only
> > use non-deprecated relocation types.
>
> And so you will need to repost this bug report to the gcc bug mailing
> list, since it is gcc's fault...
>
> What is happening is that GCC is producing this assembler output for the
> call to hi():
>
> bl hi(PLT)
>
> The presence of the "(PLT)" instructs GAS to produce the deprecated
> ARM_PLT32 reloc. (See the ARM specific portion of the GAS documentation
> for a mention of this).
>
> 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.
>
> Cheers
> Nick