Commit: More handling of ifunc relocs in note sections

Nick Clifton
Fri Mar 9 14:36:00 GMT 2018

Hi Guys,

  Following on from PR 22929, I have found the same problem exists with
  other ifunc supporting targets too.  Plus see this link for the bug
  being reported against the s390x binutils for Fedora rawhide:

  So I am going to check in the patch below which applies the same
  change that H.J. made for the x86_64 target to the other affected
  targets.  (Specifically: S390, AArch64 and Sparc).  Plus it adds a new
  test to the linker testsuite to make sure that this problem stays


2018-03-09  Nick Clifton  <>

	* elf64-s390.c (elf_s390_relocate_section): Move check for
	relocations against non-allocated sections to before the code that
	handles ifunc relocations.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
	relocs aginst IFUNC symbols in non-allocated sections as relocs
	agains FUNC symbols.
	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.

2018-03-09  Nick Clifton  <>

	* testsuite/ld-ifunc/ifuncmod5.s: New test.  Checks that targets
	that support IFUNC symbols can handle relocations against those
	symbols in NOTE sections.
	* testsuite/ld-ifunc/ifuncmod5.d: New file:  Driver for the new
	* testsuite/ld-ifunc/ifunc.exp: Run the new test.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ifunc-relocs-in-notes.patch
Type: text/x-patch
Size: 6425 bytes
Desc: not available
URL: <>

More information about the Binutils mailing list