* elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs.
authorAlan Modra <amodra@gmail.com>
Thu, 1 Jul 2010 04:12:29 +0000 (04:12 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 1 Jul 2010 04:12:29 +0000 (04:12 +0000)
bfd/ChangeLog
bfd/elf64-ppc.c

index 6d8f791fcbf7d455332b7399e0202b84a36ac274..bf26c58ae695d53732bf8f21c759d4e8020eafc6 100644 (file)
@@ -1,3 +1,7 @@
+2010-07-01  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs.
+
 2010-06-29  Alan Modra  <amodra@gmail.com>
 
        * cpu-maxq.c: Delete file.
index 97d607b22c2fd7cc5df1ecff7e0076ffb1f74f3c..482be3e754e1628bb0a03239d86648c4f506d147 100644 (file)
@@ -8043,9 +8043,17 @@ ppc64_elf_edit_toc (struct bfd_link_info *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;