aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-07-22 21:30:30 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-07-22 21:30:30 +0000
commitb63cc625a128b6eba0f66330d16db767a6f56038 (patch)
tree7a973a3a8cfc3eadbf6accf210ae5f289d586fbb /bfd
parent8caee43bac0296eecebf3b9c80c48958044a95c5 (diff)
downloadgdb-b63cc625a128b6eba0f66330d16db767a6f56038.zip
gdb-b63cc625a128b6eba0f66330d16db767a6f56038.tar.gz
gdb-b63cc625a128b6eba0f66330d16db767a6f56038.tar.bz2
2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10433 * elflink.c (elf_link_output_extsym): Special case ifunc syms when ref_regular, not def_regular.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 926e5d9..35e90b3 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/10433
+ * elflink.c (elf_link_output_extsym): Special case ifunc syms
+ when ref_regular, not def_regular.
+
2009-07-21 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10426
diff --git a/bfd/elflink.c b/bfd/elflink.c
index f9b577c..2af1af5 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -8660,9 +8660,10 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
and also to finish up anything that needs to be done for this
symbol. FIXME: Not calling elf_backend_finish_dynamic_symbol for
forced local syms when non-shared is due to a historical quirk.
- STT_GNU_IFUNC symbol must go through PLT. */
+ STT_GNU_IFUNC symbol must go through PLT only if it is ever
+ referenced. */
if ((h->type == STT_GNU_IFUNC
- && h->def_regular
+ && h->ref_regular
&& !finfo->info->relocatable)
|| ((h->dynindx != -1
|| h->forced_local)