aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ChangeLog
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-09-01 05:06:16 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-09-01 05:06:33 -0700
commit04ebc307f9601168c165fb63aa39a676e45454b7 (patch)
tree3db90b1dba71a706df7edb2f28a6e2104587ebdd /ld/testsuite/ChangeLog
parentb07bca4ecd27f9cbaff822e4135abaf0ae6cd0db (diff)
downloadgdb-04ebc307f9601168c165fb63aa39a676e45454b7.zip
gdb-04ebc307f9601168c165fb63aa39a676e45454b7.tar.gz
gdb-04ebc307f9601168c165fb63aa39a676e45454b7.tar.bz2
Skip PLT for function pointer initialization
We use its PLT entry to initialize function pointer at run-time. If there is no other usage for the PLT entry, we can generate run-time function pointer relocations in read-write section, which can be resolved by dynamic linker, to initialize function pointers. It avoids the extra indirect branch overhead in PLT. bfd/ PR ld/18900 * elf32-i386.c (elf_i386_link_hash_entry): Add func_pointer_refcount. (elf_i386_link_hash_newfunc): Clear func_pointer_refcount. (elf_i386_get_local_sym_hash): Likewise. (elf_i386_copy_indirect_symbol): Also copy func_pointer_refcount. (elf_i386_check_relocs): Increment func_pointer_refcount. (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount. (elf_i386_allocate_dynrelocs): Don't create the PLT entry if there are only function pointer relocations which can be resolved at run-time. Keep dynanamic relocations for run-time function pointer initialization. (elf_i386_relocate_section): Copy dynamic function pointer relocations. * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add func_pointer_refcount. (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount. (elf_x86_64_get_local_sym_hash): Likewise. (elf_x86_64_copy_indirect_symbol): Also copy func_pointer_refcount. (elf_x86_64_check_relocs): Increment func_pointer_refcount. (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount. (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if there are only function pointer relocations which can be resolved at run-time. Keep dynanamic relocations for run-time function pointer initialization. (elf_x86_64_relocate_section): Copy dynamic function pointer relocations. ld/testsuite/ PR ld/18900 * ld-i386/i386.exp: Run tests for PR ld/18900. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/pr18900.out: New file. * ld-i386/pr18900a.c: Likewise. * ld-i386/pr18900a.c: Likewise. * ld-i386/pr18900a.rd: Likewise. * ld-i386/pr18900b.c: Likewise. * ld-i386/pr18900b.rd: Likewise. * ld-i386/pr18900c.c: Likewise. * ld-x86-64/pr18900.out: Likewise. * ld-x86-64/pr18900a.c: Likewise. * ld-x86-64/pr18900a.rd: Likewise. * ld-x86-64/pr18900b.c: Likewise. * ld-x86-64/pr18900b.rd: Likewise. * ld-x86-64/pr18900c.c: Likewise. * ld-x86-64/mpx3.dd: Updated.
Diffstat (limited to 'ld/testsuite/ChangeLog')
-rw-r--r--ld/testsuite/ChangeLog20
1 files changed, 20 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 7650cda..0241c08 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,23 @@
+2015-09-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/18900
+ * ld-i386/i386.exp: Run tests for PR ld/18900.
+ * ld-x86-64/x86-64.exp: Likewise.
+ * ld-i386/pr18900.out: New file.
+ * ld-i386/pr18900a.c: Likewise.
+ * ld-i386/pr18900a.c: Likewise.
+ * ld-i386/pr18900a.rd: Likewise.
+ * ld-i386/pr18900b.c: Likewise.
+ * ld-i386/pr18900b.rd: Likewise.
+ * ld-i386/pr18900c.c: Likewise.
+ * ld-x86-64/pr18900.out: Likewise.
+ * ld-x86-64/pr18900a.c: Likewise.
+ * ld-x86-64/pr18900a.rd: Likewise.
+ * ld-x86-64/pr18900b.c: Likewise.
+ * ld-x86-64/pr18900b.rd: Likewise.
+ * ld-x86-64/pr18900c.c: Likewise.
+ * ld-x86-64/mpx3.dd: Updated.
+
2015-08-27 Alan Modra <amodra@gmail.com>
* ld-powerpc/relocsort.s, * ld-powerpc/relocsort.d: New test.