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]

Re: PowerPC64 large toc optimization


My large-toc optimization went a little too far, as shown by failing
glibc ifunc tests.

	* elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs.

Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.330
diff -u -p -r1.330 elf64-ppc.c
--- bfd/elf64-ppc.c	27 Jun 2010 08:37:22 -0000	1.330
+++ bfd/elf64-ppc.c	1 Jul 2010 03:49:45 -0000
@@ -8045,9 +8043,17 @@ ppc64_elf_edit_toc (struct bfd_link_info
 		continue;
 
 	      if (h != NULL)
-		val = h->root.u.def.value;
+		{
+		  if (h->type == STT_GNU_IFUNC)
+		    continue;
+		  val = h->root.u.def.value;
+		}
 	      else
-		val = sym->st_value;
+		{
+		  if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
+		    continue;
+		  val = sym->st_value;
+		}
 	      val += rel->r_addend;
 	      val += sym_sec->output_section->vma + sym_sec->output_offset;
 

-- 
Alan Modra
Australia Development Lab, IBM


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