This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Remove check of h->plt.refcount > 0 on STT_GNU_IFUNC symbol
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sources dot redhat dot com
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 3 Jun 2009 09:57:46 -0700
- Subject: PATCH: Remove check of h->plt.refcount > 0 on STT_GNU_IFUNC symbol
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Even if we don't have PLT relocation on STT_GNU_IFUNC symbol, we still
need PLT entry for function pointer. I am checking in this patch to fix
it.
H.J.
---
2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
Index: elf64-x86-64.c
===================================================================
--- elf64-x86-64.c (revision 6057)
+++ elf64-x86-64.c (working copy)
@@ -1793,9 +1793,6 @@ elf64_x86_64_allocate_dynrelocs (struct
return TRUE;
}
- if (h->plt.refcount <= 0)
- abort ();
-
/* When building a static executable, use .iplt, .igot.plt and
.rela.iplt sections for STT_GNU_IFUNC symbols. */
if (htab->splt != 0)
Index: elf32-i386.c
===================================================================
--- elf32-i386.c (revision 6058)
+++ elf32-i386.c (working copy)
@@ -1955,9 +1955,6 @@ elf_i386_allocate_dynrelocs (struct elf_
return TRUE;
}
- if (h->plt.refcount <= 0)
- abort ();
-
/* When building a static executable, use .iplt, .igot.plt and
.rel.iplt sections for STT_GNU_IFUNC symbols. */
if (htab->splt != 0)