|
Also fix some ix86 fails.
* testsuite/ld-ifunc/ifunc.exp: Enable for more targets, specifying
targets that don't support ifunc rather than ones that do.
(contains_irelative_reloc): Match R_PARISC_IPLT.
* testsuite/ld-ifunc/lib.c: Don't use .set in asm.
* testsuite/ld-ifunc/ifunc-23-x86.s,
* testsuite/ld-ifunc/ifunc-24-x86.s,
* testsuite/ld-ifunc/ifunc-25-x86.s,
* testsuite/ld-ifunc/ifunc-4-local-x86.s,
* testsuite/ld-ifunc/ifunc-4-x86.s: Define _main.
* testsuite/ld-ifunc/ifunc-10-i386.d,
* testsuite/ld-ifunc/ifunc-11-i386.d,
* testsuite/ld-ifunc/ifunc-12-i386.d,
* testsuite/ld-ifunc/ifunc-13-i386.d,
* testsuite/ld-ifunc/ifunc-14a-i386.d,
* testsuite/ld-ifunc/ifunc-14b-i386.d,
* testsuite/ld-ifunc/ifunc-14c-i386.d,
* testsuite/ld-ifunc/ifunc-14d-i386.d,
* testsuite/ld-ifunc/ifunc-14e-i386.d,
* testsuite/ld-ifunc/ifunc-14f-i386.d,
* testsuite/ld-ifunc/ifunc-15-i386.d,
* testsuite/ld-ifunc/ifunc-16-i386-now.d,
* testsuite/ld-ifunc/ifunc-16-i386.d,
* testsuite/ld-ifunc/ifunc-17a-i386.d,
* testsuite/ld-ifunc/ifunc-17b-i386.d,
* testsuite/ld-ifunc/ifunc-18a-i386.d,
* testsuite/ld-ifunc/ifunc-18b-i386.d,
* testsuite/ld-ifunc/ifunc-19a-i386.d,
* testsuite/ld-ifunc/ifunc-19b-i386.d,
* testsuite/ld-ifunc/ifunc-2-i386-now.d,
* testsuite/ld-ifunc/ifunc-2-i386.d,
* testsuite/ld-ifunc/ifunc-2-local-i386-now.d,
* testsuite/ld-ifunc/ifunc-2-local-i386.d,
* testsuite/ld-ifunc/ifunc-20-i386.d,
* testsuite/ld-ifunc/ifunc-21-i386.d,
* testsuite/ld-ifunc/ifunc-22-i386.d,
* testsuite/ld-ifunc/ifunc-26.d,
* testsuite/ld-ifunc/ifunc-5a-i386.d,
* testsuite/ld-ifunc/ifunc-5a-local-i386.d,
* testsuite/ld-ifunc/ifunc-5b-i386.d,
* testsuite/ld-ifunc/ifunc-5b-local-i386.d,
* testsuite/ld-ifunc/ifunc-5r-local-i386.d,
* testsuite/ld-ifunc/ifunc-6a-i386.d,
* testsuite/ld-ifunc/ifunc-6b-i386.d,
* testsuite/ld-ifunc/ifunc-7a-i386.d,
* testsuite/ld-ifunc/ifunc-7b-i386.d,
* testsuite/ld-ifunc/ifunc-8-i386.d,
* testsuite/ld-ifunc/ifunc-9-i386.d,
* testsuite/ld-ifunc/pr17154-i386-now.d,
* testsuite/ld-ifunc/pr17154-i386.d: xfail lynxos, nto, and solaris.
|
|
2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10205
* elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
(elf_i386_reloc_type_lookup): Likewise.
(R_386_tls): Removed.
(R_386_irelative): New.
(R_386_vt_offset): Updated.
(elf_i386_rtype_to_howto): Likewise.
(elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
(elf_i386_link_hash_table_create): Initialize igotplt,
iplt and irelplt.
(elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
(elf_i386_adjust_dynamic_symbol): Likewise.
(elf_i386_allocate_dynrelocs): Likewise.
(elf_i386_relocate_section): Likewise.
(elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
sections.
(elf_i386_finish_dynamic_symbol): When building a static
executable, use .iplt, .igot.plt and .rel.iplt sections for
STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
locally defined STT_GNU_IFUNC symbol.
* elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
(x86_64_reloc_map): Likewise.
(R_X86_64_standard): Updated.
(elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
(elf64_x86_64_link_hash_table_create): Initialize igotplt,
iplt and irelplt.
(elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
(elf64_x86_64_adjust_dynamic_symbol): Likewise.
(elf64_x86_64_allocate_dynrelocs): Likewise.
(elf64_x86_64_relocate_section): Likewise.
(elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
sections.
(elf64_x86_64_finish_dynamic_symbol): When building a static
executable, use .iplt, .igot.plt and .rela.iplt sections for
STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
for locally defined STT_GNU_IFUNC symbol.
* reloc.c (BFD_RELOC_386_IRELATIVE): New.
(BFD_RELOC_X86_64_IRELATIVE): Likewise.
* bfd-in2.h: Regenerated.
* libbfd.h: Likewise.
include/elf/
2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10205
* i386.h (R_386_IRELATIVE): New.
* x86-64.h (R_X86_64_IRELATIVE): Likewise.
ld/testsuite/
2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10205
* ld-ifunc/ifunc.exp (contains_irelative_reloc): New.
Use it on executable and shared library.
Run *.d.
* ld-ifunc/lib.c: Add a hidden alias, __GI_library_func2, for
library_func2.
(library_func): New.
* ld-ifunc/ifunc-1-x86.d: New.
* ld-ifunc/ifunc-1-x86.s: Likewise.
* ld-ifunc/ifunc-2-i386.d: Likewise.
* ld-ifunc/ifunc-2-i386.s: Likewise.
* ld-ifunc/ifunc-2-x86-64.d: Likewise.
* ld-ifunc/ifunc-2-x86-64.s: Likewise.
* ld-ifunc/ifunc-3a-x86.d: Likewise.
* ld-ifunc/ifunc-3b-x86.d: Likewise.
* ld-ifunc/ifunc-3-x86.s: Likewise.
* ld-ifunc/ifunc-4-x86.d: Likewise.
* ld-ifunc/ifunc-4-x86.s: Likewise.
* ld-ifunc/ifunc-5-i386.d: Likewise.
* ld-ifunc/ifunc-5-i386.s: Likewise.
* ld-ifunc/ifunc-5-x86-64.d: Likewise.
* ld-ifunc/ifunc-5-x86-64.s: Likewise.
|