This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PowerPC64 large toc optimization
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 1 Jul 2010 13:41:18 +0930
- Subject: Re: PowerPC64 large toc optimization
- References: <20100625052144.GH21855@bubble.grove.modra.org>
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