+2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/12694
+ * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
+ symbols.
+ * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
+
2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
if (h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ /* Skip local IFUNC symbols. */
+ if (h->forced_local && h->type == STT_GNU_IFUNC)
+ return TRUE;
+
eh = (struct elf_i386_link_hash_entry *) h;
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
if (h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ /* Skip local IFUNC symbols. */
+ if (h->forced_local && h->type == STT_GNU_IFUNC)
+ return TRUE;
+
eh = (struct elf_x86_64_link_hash_entry *) h;
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
+2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/12694
+ * ld-ifunc/ifunc-14-i386.d: New.
+ * ld-ifunc/ifunc-14-x86-64.d: Likewise.
+ * ld-ifunc/ifunc-14a.s: Likewise.
+ * ld-ifunc/ifunc-14b.s: Likewise.
+
2011-04-19 H.J. Lu <hongjiu.lu@intel.com>
* ld-plugin/plugin-ignore.d: Removed.
--- /dev/null
+#source: ifunc-14a.s
+#source: ifunc-14b.s
+#ld: -shared -m elf_i386 -z nocombreloc
+#as: --32
+#readelf: -d --wide
+#target: x86_64-*-* i?86-*-*
+
+#failif
+#...
+.*\(TEXTREL\).*
+#...
--- /dev/null
+#source: ifunc-14a.s
+#source: ifunc-14b.s
+#ld: -shared -m elf_x86_64 -z nocombreloc
+#as: --64
+#readelf: -d
+#target: x86_64-*-*
+
+#failif
+#...
+.*\(TEXTREL\).*
+#...
--- /dev/null
+ .text
+ .globl bar
+ .type bar, @function
+bar:
+ jmp foo
+ .size bar, .-bar
+ .hidden foo
--- /dev/null
+ .type foo, %gnu_indirect_function
+ .globl foo
+foo:
+ ret
+ .size foo, .-foo