[PATCH v2][AArch64] Fix PR18841 ifunc relocation ordering

Szabolcs Nagy szabolcs.nagy@arm.com
Wed Jul 19 13:00:00 GMT 2017


On 19/07/17 10:20, Szabolcs Nagy wrote:
> On 18/07/17 17:23, Nick Clifton wrote:
>> 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).
> 
> thanks for the review.
> 
> i don't see bfd_error_message.
> do you mean bfd_perror (printing last bfd error)
> or bfd_assert (aborting with an error message)
> or bfd_error_handler (printing a custom message) ?
> 
> i can return some random reloc class, but i don't
> know if continuing in such state is valid.
> 

using _bfd_error_handler (with an existing error
message from elf.c) is this OK?:


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

bfd/
2017-07-19  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	PR ld/18841
	* elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
	reloc_class_ifunc for ifunc symbols.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ifunc11.diff
Type: text/x-patch
Size: 1542 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20170719/1d1b7eba/attachment.bin>


More information about the Binutils mailing list