aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-07-01 04:12:29 +0000
committerAlan Modra <amodra@gmail.com>2010-07-01 04:12:29 +0000
commitbddc25c9ca7f587e969e765cb73d904348ce9e00 (patch)
tree0be8febd4f4ac996b03ad4d2e8115ab1f6496785 /bfd
parent09a8ad8d8f56980fa431ad5ad36dee90fa08ee76 (diff)
downloadgdb-bddc25c9ca7f587e969e765cb73d904348ce9e00.zip
gdb-bddc25c9ca7f587e969e765cb73d904348ce9e00.tar.gz
gdb-bddc25c9ca7f587e969e765cb73d904348ce9e00.tar.bz2
* elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf64-ppc.c12
2 files changed, 14 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6d8f791..bf26c58 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 97d607b..482be3e 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -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;