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: Richard Earnshaw <rearnsha at arm dot com>
- To: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Cc: Will Newton <will dot newton at linaro dot org>, "binutils at sourceware dot org" <binutils at sourceware dot org>, Patch Tracking <patches at linaro dot org>
- Date: Tue, 26 Nov 2013 10:38:10 +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>
On 26/11/13 10:34, Marcus Shawcroft 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?
>
> /Marcus
>
In general, abort is OK here if it's due to internal inconsistencies in
the linker. It's not OK if it's due to inconsistencies in the input
object files.
R.