This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][AArch64] Fix PR18841 ifunc relocation ordering
- From: Nick Clifton <nickc at redhat dot com>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, Binutils <binutils at sourceware dot org>
- Cc: nd at arm dot com
- Date: Tue, 18 Jul 2017 17:23:53 +0100
- Subject: Re: [PATCH][AArch64] Fix PR18841 ifunc relocation ordering
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=nickc at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E9191C0273B4
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E9191C0273B4
- References: <59637E45.8060206@arm.com>
Hi Szabolcs,
> In order to get the ifunc relocs properly sorted the correct class
> needs to be returned. The code mimics what has been done for x86.
>
> Fixes
> FAIL: Run pr18841 with libpr18841c.so
The patch is OK, but I would like to see one change:
+ if (!bed->s->swap_symbol_in (abfd,
+ (htab->root.dynsym->contents
+ + r_symndx * bed->s->sizeof_sym),
+ 0, &sym))
+ abort ();
I strongly dislike calls to abort() inside a library. Corrupt input
files can trigger them, and they are of no help to the user. So please
replace this with a call to bfd_error_message(). (It would be nice if
there was a reloc_class_unknown so that you could return that value, but
that would be too big of a change).
Cheers
Nick