x86: Dump local IFUNC functions in the map file
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 8 Jun 2017 04:18:01 +0000 (21:18 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 8 Jun 2017 10:53:43 +0000 (03:53 -0700)
commit6322e5c5cb7ffe1c26c50f117765503717b0431c
tree278fe5c87998fc591d6c4c8c81f7c74cc0f1101e
parent51fa2693add9ead8288f475d380f4aec7372fe5a
x86: Dump local IFUNC functions in the map file

Dump local IFUNC functions in the map file when generating IRELATIVE
relocations if -Map is used.

bfd/

* elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
name.  Use local IFUNC symbol name string to report unsupported
non-PIC call to IFUNC function.
(elf_i386_relocate_section): Dump local IFUNC name with minfo
when generating R_386_IRELATIVE relocation.
(elf_i386_finish_dynamic_symbol): Likewise.
* elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
IFUNC symbol name.
(elf_x86_64_relocate_section): Dump local IFUNC name with minfo
when generating R_X86_64_IRELATIVE relocation.
(elf_x86_64_finish_dynamic_symbol): Likewise.

ld/

* testsuite/ld-ifunc/ifunc-1-local-x86.d: Pass
"-Map tmpdir/ifunc-1-local-x86.map" to ld and check
ifunc-1-local-x86.map.
* testsuite/ld-ifunc/ifunc-1-x86.d: Pass
"-Map tmpdir/ifunc-1-x86.map" to ld and check ifunc-1-x86.map.
* testsuite/ld-ifunc/ifunc-1-local-x86.map: New file.
* testsuite/ld-ifunc/ifunc-1-x86.map: Likewise.
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/testsuite/ld-ifunc/ifunc-1-local-x86.d
ld/testsuite/ld-ifunc/ifunc-1-local-x86.map [new file with mode: 0644]
ld/testsuite/ld-ifunc/ifunc-1-x86.d
ld/testsuite/ld-ifunc/ifunc-1-x86.map [new file with mode: 0644]