This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 2/2] bfd/elfnn-aarch64.c: Handle static links with ifunc correctly.
- From: Will Newton <will dot newton at linaro dot org>
- To: Marcus Shawcroft <marcus dot shawcroft at arm dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, "gingold at adacore dot com" <gingold at adacore dot com>
- Date: Thu, 5 Dec 2013 09:37:16 +0000
- Subject: Re: [PATCH 2/2] bfd/elfnn-aarch64.c: Handle static links with ifunc correctly.
- Authentication-results: sourceware.org; auth=none
- References: <529461B1 dot 8080200 at linaro dot org> <CAFqB+PzzRq43d+oEdx14JJcVA=Oqy0-SEaMkSEGoywmtD40iGg at mail dot gmail dot com> <CANu=DmiXfZgi6T45HPueCsoxARhgFFKtV1B4DJ25OORs1SiW5w at mail dot gmail dot com> <529480D2 dot 9050000 at arm dot com> <CANu=DmjTGfFYUPxvV=fpAii-dUuRMG-eG4t7GNhtBph65oOf2w at mail dot gmail dot com>
On 2 December 2013 08:38, Will Newton <will.newton@linaro.org> wrote:
> On 26 November 2013 11:06, Marcus Shawcroft <marcus.shawcroft@arm.com> wrote:
>> On 26/11/13 10:39, Will Newton wrote:
>>>
>>> On 26 November 2013 10:34, Marcus Shawcroft <marcus.shawcroft@gmail.com>
>>> wrote:
>>>>
>>>> On 26 November 2013 08:54, Will Newton <will.newton@linaro.org> wrote:
>>>>
>>>>> - if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h))
>>>>> + if (h->def_regular
>>>>> + && h->type == STT_GNU_IFUNC)
>>>>> + {
>>>>> + if (info->shared)
>>>>> + {
>>>>> + /* Generate R_AARCH64_GLOB_DAT. */
>>>>> + goto do_glob_dat;
>>>>> + }
>>>>> + else
>>>>> + {
>>>>> + asection *plt;
>>>>> +
>>>>> + if (!h->pointer_equality_needed)
>>>>> + abort ();
>>>>
>>>>
>>>> Is abort() the best option here, can't we spit out a diagnostic and
>>>> return?
>>>
>>>
>>> I believe it is really an assert as _bfd_elf_allocate_ifunc_dyn_relocs
>>> ensures this condition does not occur. The code is copied from
>>> i386/x86_64 for better or worse - I am never quite sure whether it is
>>> better to be the same or different in these cases. ;-)
>>
>>
>> If you are confident it is an assert then I'm happy to leave the code the
>> same as the donor. In which case this is OK for trunk.
>>
>> I'd like to see these two IFUNC patches in 2.24, Tristan ?
>
> Hi Tristan,
>
> Are these ok for 2.24?
>
> Thanks,
Ping?
--
Will Newton
Toolchain Working Group, Linaro