binutils-gdb/ld/testsuite/ld-ifunc
Nick Clifton f657f8c4a1 Fix Sparc, s390 and AArch64 targets so that they can handle relocs against ifunc symbols found in note sections.
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:

     https://bugzilla.redhat.com/show_bug.cgi?id=1553705

  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
  fixed.

bfd	* 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 against IFUNC symbols in non-allocated sections as relocs
	against FUNC symbols.
	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.

ld	* 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
	test.
	* testsuite/ld-ifunc/ifunc.exp: Run the new test.
2018-03-09 14:37:36 +00:00
..
binutils.exp Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
dummy.c Check incompatible existing default symbol definition 2014-01-21 15:42:51 -08:00
ifunc-1-local-x86.d i386: Update IFUNC tests for PLT address 2018-02-16 09:32:56 -08:00
ifunc-1-local-x86.map x86: Dump local IFUNC functions in the map file 2017-06-08 03:53:43 -07:00
ifunc-1-local-x86.s bfd/ 2009-06-14 01:39:46 +00:00
ifunc-1-x86.d i386: Update IFUNC tests for PLT address 2018-02-16 09:32:56 -08:00
ifunc-1-x86.map x86: Dump local IFUNC functions in the map file 2017-06-08 03:53:43 -07:00
ifunc-1-x86.s bfd/ 2009-06-01 13:11:52 +00:00
ifunc-2-i386-now.d x86: Add -z noseparate-code to IFUNC tests 2018-02-16 09:45:24 -08:00
ifunc-2-i386.d bfd/ 2009-06-01 13:11:52 +00:00
ifunc-2-i386.s i386: Issue an error on non-PIC call to IFUNC in PIC object 2016-08-29 08:14:45 -07:00
ifunc-2-local-i386-now.d x86: Add -z noseparate-code to IFUNC tests 2018-02-16 09:45:24 -08:00
ifunc-2-local-i386.d bfd/ 2009-06-14 01:39:46 +00:00
ifunc-2-local-i386.s i386: Issue an error on non-PIC call to IFUNC in PIC object 2016-08-29 08:14:45 -07:00
ifunc-2-local-x86-64-now.d x86-64: Add -z max-page-size=0x200000 -z noseparate-code to IFUNC tests 2018-02-16 09:39:22 -08:00
ifunc-2-local-x86-64.d x86: Add -z noseparate-code to IFUNC tests 2018-02-16 09:45:24 -08:00
ifunc-2-local-x86-64.s bfd/ 2009-06-14 01:39:46 +00:00
ifunc-2-x86-64-now.d x86-64: Add -z max-page-size=0x200000 -z noseparate-code to IFUNC tests 2018-02-16 09:39:22 -08:00
ifunc-2-x86-64.d x86-64: Add -z max-page-size=0x200000 -z noseparate-code to IFUNC tests 2018-02-16 09:39:22 -08:00
ifunc-2-x86-64.s bfd/ 2009-06-01 13:11:52 +00:00
ifunc-3-x86.s bfd/ 2009-06-01 13:11:52 +00:00
ifunc-3a-x86.d i386: Update IFUNC tests for PLT address 2018-02-16 09:32:56 -08:00
ifunc-3b-x86.d bfd/ 2009-06-01 13:11:52 +00:00
ifunc-4-local-x86.d bfd/ 2009-06-14 01:39:46 +00:00
ifunc-4-local-x86.s bfd/ 2009-06-14 01:39:46 +00:00
ifunc-4-x86.d bfd/ 2009-06-01 13:11:52 +00:00
ifunc-4-x86.s bfd/ 2009-06-01 13:11:52 +00:00
ifunc-4a-x86.d Don't return on STT_GNU_IFUNC symbol when stripping. 2009-11-09 14:37:16 +00:00
ifunc-5-i386.s bfd/ 2009-06-01 13:11:52 +00:00
ifunc-5-local-i386.s bfd/ 2009-06-14 01:39:46 +00:00
ifunc-5-local-x86-64.s bfd/ 2009-06-14 01:39:46 +00:00
ifunc-5-x86-64.s bfd/ 2009-06-01 13:11:52 +00:00
ifunc-5a-i386.d bfd/ 2009-06-02 17:31:42 +00:00
ifunc-5a-local-i386.d bfd/ 2009-06-14 01:39:46 +00:00
ifunc-5a-local-x86-64.d bfd/ 2009-06-14 01:39:46 +00:00
ifunc-5a-x86-64.d 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-5b-i386.d bfd/ 2009-06-02 17:31:42 +00:00
ifunc-5b-local-i386.d bfd/ 2009-06-14 01:39:46 +00:00
ifunc-5b-local-x86-64.d bfd/ 2009-06-14 01:39:46 +00:00
ifunc-5b-x86-64.d 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-5r-local-i386.d bfd/ 2009-07-16 14:23:12 +00:00
ifunc-5r-local-x86-64.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
ifunc-6-i386.s bfd/ 2009-06-02 17:31:42 +00:00
ifunc-6-x86-64.s bfd/ 2009-06-02 17:31:42 +00:00
ifunc-6a-i386.d bfd/ 2009-06-02 17:31:42 +00:00
ifunc-6a-x86-64.d 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-6b-i386.d bfd/ 2009-06-02 17:31:42 +00:00
ifunc-6b-x86-64.d 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-7-i386.s bfd/ 2009-06-02 17:31:42 +00:00
ifunc-7-x86-64.s bfd/ 2009-06-02 17:31:42 +00:00
ifunc-7a-i386.d bfd/ 2009-06-02 17:31:42 +00:00
ifunc-7a-x86-64.d 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-7b-i386.d bfd/ 2009-06-02 17:31:42 +00:00
ifunc-7b-x86-64.d 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-8-i386.d 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-8-x86-64.d 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-8a-i386.s 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-8a-x86-64.s 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-8b-i386.s 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-8b-x86-64.s 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> 2009-06-03 17:32:02 +00:00
ifunc-9-x86.d 2009-06-15 H.J. Lu <hongjiu.lu@intel.com> 2009-06-15 13:28:56 +00:00
ifunc-9-x86.s bfd/ 2009-06-14 22:13:30 +00:00
ifunc-10-i386.d Support garbage collection against STT_GNU_IFUNC symbols. 2010-07-13 16:59:14 +00:00
ifunc-10-i386.s Handle STT_GNU_IFUNC symols when building shared library. 2011-01-06 18:45:05 +00:00
ifunc-10-x86-64.d Support garbage collection against STT_GNU_IFUNC symbols. 2010-07-13 16:59:14 +00:00
ifunc-10-x86-64.s Handle STT_GNU_IFUNC symols when building shared library. 2011-01-06 18:45:05 +00:00
ifunc-11-i386.d Support garbage collection against STT_GNU_IFUNC symbols. 2010-07-13 16:59:14 +00:00
ifunc-11-i386.s Handle STT_GNU_IFUNC symols when building shared library. 2011-01-06 18:45:05 +00:00
ifunc-11-x86-64.d Support garbage collection against STT_GNU_IFUNC symbols. 2010-07-13 16:59:14 +00:00
ifunc-11-x86-64.s Handle STT_GNU_IFUNC symols when building shared library. 2011-01-06 18:45:05 +00:00
ifunc-12-i386.d Handle STT_GNU_IFUNC symols when building shared library. 2011-01-06 18:45:05 +00:00
ifunc-12-i386.s Handle STT_GNU_IFUNC symols when building shared library. 2011-01-06 18:45:05 +00:00
ifunc-12-x86-64.d Handle STT_GNU_IFUNC symols when building shared library. 2011-01-06 18:45:05 +00:00
ifunc-12-x86-64.s Handle STT_GNU_IFUNC symols when building shared library. 2011-01-06 18:45:05 +00:00
ifunc-13-i386.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-13-x86-64.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-13a-i386.s * read.c (read_symbol_name): New function. Reads a symbol names. 2012-05-28 14:20:19 +00:00
ifunc-13a-x86-64.s Add missing "foo" after ".global" 2012-05-31 17:16:54 +00:00
ifunc-13b-i386.s Handle STT_GNU_IFUNC symols when building shared library. 2011-01-06 18:45:05 +00:00
ifunc-13b-x86-64.s Handle STT_GNU_IFUNC symols when building shared library. 2011-01-06 18:45:05 +00:00
ifunc-14a-i386.d Check local IFUNC calls 2012-12-13 21:07:16 +00:00
ifunc-14a-x86-64.d Check local IFUNC calls 2012-12-13 21:07:16 +00:00
ifunc-14a.s i386: Issue an error on non-PIC call to IFUNC in PIC object 2016-08-29 08:14:45 -07:00
ifunc-14b-i386.d Check local IFUNC calls 2012-12-13 21:07:16 +00:00
ifunc-14b-x86-64.d Check local IFUNC calls 2012-12-13 21:07:16 +00:00
ifunc-14b.s Skip local IFUNC symbols when checking dynamic relocs in read-only sections. 2011-04-21 22:25:39 +00:00
ifunc-14c-i386.d Check local IFUNC calls 2012-12-13 21:07:16 +00:00
ifunc-14c-x86-64.d Check local IFUNC calls 2012-12-13 21:07:16 +00:00
ifunc-14c.s i386: Issue an error on non-PIC call to IFUNC in PIC object 2016-08-29 08:14:45 -07:00
ifunc-14d-i386.d Check local IFUNC calls 2012-12-13 21:07:16 +00:00
ifunc-14d-x86-64.d Check local IFUNC calls 2012-12-13 21:07:16 +00:00
ifunc-14e-i386.d Properly adjust h->plt.refcount 2012-12-21 18:15:22 +00:00
ifunc-14e-x86-64.d Properly adjust h->plt.refcount 2012-12-21 18:15:22 +00:00
ifunc-14f-i386.d Properly adjust h->plt.refcount 2012-12-21 18:15:22 +00:00
ifunc-14f-x86-64.d Properly adjust h->plt.refcount 2012-12-21 18:15:22 +00:00
ifunc-15-i386.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-15-i386.s * read.c (read_symbol_name): New function. Reads a symbol names. 2012-05-28 14:20:19 +00:00
ifunc-15-x86-64.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-15-x86-64.s Add missing "foo" after ".global" 2012-05-31 17:16:54 +00:00
ifunc-16-i386-now.d x86: Generate PLT relocations for -z now 2017-05-11 07:45:59 -07:00
ifunc-16-i386.d Put IRELATIVE relocations after JUMP_SLOT. 2011-10-21 15:13:37 +00:00
ifunc-16-x86-64-now.d x86: Generate PLT relocations for -z now 2017-05-11 07:45:59 -07:00
ifunc-16-x86-64.d Put IRELATIVE relocations after JUMP_SLOT. 2011-10-21 15:13:37 +00:00
ifunc-16-x86.s Put IRELATIVE relocations after JUMP_SLOT. 2011-10-21 15:13:37 +00:00
ifunc-17a-i386.d Properly handle common symbol and weak function 2012-09-19 00:53:30 +00:00
ifunc-17a-x86-64.d Properly handle common symbol and weak function 2012-09-19 00:53:30 +00:00
ifunc-17a.s Properly handle common symbol and weak function 2012-09-19 00:53:30 +00:00
ifunc-17b-i386.d Properly handle common symbol and weak function 2012-09-19 00:53:30 +00:00
ifunc-17b-x86-64.d Properly handle common symbol and weak function 2012-09-19 00:53:30 +00:00
ifunc-17b.s Properly handle common symbol and weak function 2012-09-19 00:53:30 +00:00
ifunc-18a-i386.d Don't generate PLT for IFUNC GOT/pointer reference 2016-06-18 09:17:25 -07:00
ifunc-18a-x86-64.d Don't generate PLT for IFUNC GOT/pointer reference 2016-06-18 09:17:25 -07:00
ifunc-18a.s Don't generate PLT for IFUNC GOT/pointer reference 2016-06-18 09:17:25 -07:00
ifunc-18b-i386.d Don't generate PLT for IFUNC GOT/pointer reference 2016-06-18 09:17:25 -07:00
ifunc-18b-x86-64.d Don't generate PLT for IFUNC GOT/pointer reference 2016-06-18 09:17:25 -07:00
ifunc-18b.s Also check local IFUNC references 2012-12-16 20:31:08 +00:00
ifunc-19a-i386.d Also check local IFUNC references 2012-12-16 20:31:08 +00:00
ifunc-19a-x86-64.d Also check local IFUNC references 2012-12-16 20:31:08 +00:00
ifunc-19a.s Also check local IFUNC references 2012-12-16 20:31:08 +00:00
ifunc-19b-i386.d Also check local IFUNC references 2012-12-16 20:31:08 +00:00
ifunc-19b-x86-64.d Also check local IFUNC references 2012-12-16 20:31:08 +00:00
ifunc-19b.s Also check local IFUNC references 2012-12-16 20:31:08 +00:00
ifunc-20-i386.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-20-x86-64.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-20.s Check regular reference without non-GOT reference 2013-04-15 21:16:18 +00:00
ifunc-21-i386.d x86: Add -z noseparate-code to IFUNC tests 2018-02-16 09:45:24 -08:00
ifunc-21-i386.s Add ifunc tests for call, jmp, add, test 2015-09-03 04:03:13 -07:00
ifunc-21-x86-64.d x86-64: Add -z max-page-size=0x200000 -z noseparate-code to IFUNC tests 2018-02-16 09:39:22 -08:00
ifunc-21-x86-64.s Add ifunc tests for call, jmp, add, test 2015-09-03 04:03:13 -07:00
ifunc-22-i386.d x86: Add -z noseparate-code to IFUNC tests 2018-02-16 09:45:24 -08:00
ifunc-22-i386.s Add ifunc tests for call, jmp, add, test 2015-09-03 04:03:13 -07:00
ifunc-22-x86-64.d x86-64: Add -z max-page-size=0x200000 -z noseparate-code to IFUNC tests 2018-02-16 09:39:22 -08:00
ifunc-22-x86-64.s Add ifunc tests for call, jmp, add, test 2015-09-03 04:03:13 -07:00
ifunc-23-x86.s Don't generate PLT for IFUNC GOT/pointer reference 2016-06-18 09:17:25 -07:00
ifunc-23a-x86.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-23b-x86.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-23c-x86.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-24-x86.s Don't generate PLT for IFUNC GOT/pointer reference 2016-06-18 09:17:25 -07:00
ifunc-24a-x86.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-24b-x86.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-24c-x86.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-25-x86.s Don't generate PLT for IFUNC GOT/pointer reference 2016-06-18 09:17:25 -07:00
ifunc-25a-x86.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-25b-x86.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-25c-x86.d readelf ngettext fixes 2017-11-07 17:01:16 +10:30
ifunc-common-1.out Properly handle common symbol and weak function 2012-09-19 00:53:30 +00:00
ifunc-common-1a.c Properly handle common symbol and weak function 2012-09-19 00:53:30 +00:00
ifunc-common-1b.c Properly handle common symbol and weak function 2012-09-19 00:53:30 +00:00
ifunc-lib.c Add ifunc-main IFUNC tests 2014-11-20 10:49:46 -08:00
ifunc-main.c Always load function pointer into a stack variable 2014-11-20 11:29:45 -08:00
ifunc-main.out Add ifunc-main IFUNC tests 2014-11-20 10:49:46 -08:00
ifunc.exp Fix Sparc, s390 and AArch64 targets so that they can handle relocs against ifunc symbols found in note sections. 2018-03-09 14:37:36 +00:00
ifuncmod5.d Fix Sparc, s390 and AArch64 targets so that they can handle relocs against ifunc symbols found in note sections. 2018-03-09 14:37:36 +00:00
ifuncmod5.s Fix Sparc, s390 and AArch64 targets so that they can handle relocs against ifunc symbols found in note sections. 2018-03-09 14:37:36 +00:00
lib.c bfd/ 2009-06-01 13:11:52 +00:00
pass.out Handle local IFUNC symbols in shared object 2016-03-08 09:42:16 -08:00
pr16467.out Check incompatible existing default symbol definition 2014-01-21 15:42:51 -08:00
pr16467a.c Check incompatible existing default symbol definition 2014-01-21 15:42:51 -08:00
pr16467a.map Check incompatible existing default symbol definition 2014-01-21 15:42:51 -08:00
pr16467b.c PowerPC64 dot-sym testsuite fixes 2016-12-03 20:59:43 +10:30
pr16467b.map Check incompatible existing default symbol definition 2014-01-21 15:42:51 -08:00
pr16467c.c Check incompatible existing default symbol definition 2014-01-21 15:42:51 -08:00
pr17154-i386-now.d x86: Add -z noseparate-code to IFUNC tests 2018-02-16 09:45:24 -08:00
pr17154-i386.d x86: Add -z noseparate-code to IFUNC tests 2018-02-16 09:45:24 -08:00
pr17154-x86-64-now.d x86-64: Add -z max-page-size=0x200000 -z noseparate-code to IFUNC tests 2018-02-16 09:39:22 -08:00
pr17154-x86-64.d x86-64: Add -z max-page-size=0x200000 -z noseparate-code to IFUNC tests 2018-02-16 09:39:22 -08:00
pr17154-x86.s Properly match PLT entry against .got.plt relocation 2014-07-16 10:57:49 -07:00
pr18808.out Skip IFUNC relocations in debug sections 2015-08-11 12:59:11 -07:00
pr18808a.c Skip IFUNC relocations in debug sections 2015-08-11 12:59:11 -07:00
pr18808b.c Fix compile time warning message in linker testsuite test. 2017-02-21 11:00:21 +00:00
pr18841.out Return reloc_class_ifunc for reloc against IFUNC 2015-08-18 09:50:08 -07:00
pr18841a.c Return reloc_class_ifunc for reloc against IFUNC 2015-08-18 09:50:08 -07:00
pr18841b.c Return reloc_class_ifunc for reloc against IFUNC 2015-08-18 09:50:08 -07:00
pr18841c.c Add another test for PR ld/18841 2015-08-18 10:43:47 -07:00
prog.c
test-1.c bfd/ 2009-07-21 21:37:26 +00:00
test-2.c bfd/ 2009-07-21 21:37:26 +00:00