This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Remove check of h->plt.refcount > 0 on STT_GNU_IFUNC symbol


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]