This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH, ARM] Fix handling of GOT and PLT access to IFUNC symbols
- From: Will Newton <will dot newton at linaro dot org>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, rdsandiford at googlemail dot com
- Date: Mon, 22 Apr 2013 09:37:37 +0100
- Subject: Re: [PATCH, ARM] Fix handling of GOT and PLT access to IFUNC symbols
- References: <5168395D dot 5070406 at linaro dot org> <516C1A3A dot 5090004 at arm dot com>
On 15 April 2013 16:18, Richard Earnshaw <rearnsha@arm.com> wrote:
> On 12/04/13 17:42, Will Newton wrote:
>>
>>
>> Hi all,
>>
>> The current ARM IFUNC code appears to have a bug when an access is made
>> via
>> the PLT and GOT in the same object. This results in two relocs being
>> swapped
>> out into the same slot so one R_ARM_IRELATIVE reloc goes missing.
>>
>> This patch changes the behaviour to use an incremented reloc count rather
>> than the calculated PLT index to match the behaviour of
>> elf32_arm_add_dynreloc
>> and as a result requires the order of relocs in the ifunc tests to be
>> adjusted.
>>
>> bfd/ChangeLog:
>>
>> 2013-04-12 Will Newton <will.newton@linaro.org>
>>
>> * elf32-arm.c (elf32_arm_populate_plt_entry): Increment
>> reloc_count
>> when emitting R_ARM_IRELATIVE relocs.
>>
>
> Hmm, it looks somewhat suspicious to me to be changing the reloc count this
> late on.
>
> Richard, do you know if this is safe? If not, can you recommend a better
> approach?
Ping?