aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2015-07-05 19:56:59 +0100
committerRichard Sandiford <rdsandiford@googlemail.com>2015-07-05 19:57:07 +0100
commit92a9c616e496f41c3d1da949078d5739add79161 (patch)
tree5243661e65ba554184d6e44791a91b09ed96237b /bfd/elf64-ppc.c
parent533edc14b87398bbf4cbf3083bd6deaa5b89d5ab (diff)
downloadgdb-92a9c616e496f41c3d1da949078d5739add79161.zip
gdb-92a9c616e496f41c3d1da949078d5739add79161.tar.gz
gdb-92a9c616e496f41c3d1da949078d5739add79161.tar.bz2
Fix an opd->append index in elf64-ppc.c
bfd/ * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value plus addend rather than the original st_value when looking up entries in opd->adjust. ld/testsuite/ * ld-powerpc/tocopt6-inc.s, ld-powerpc/tocopt6a.s, ld-powerpc/tocopt6b.s, ld-powerpc/tocopt6c.s, ld-powerpc/tocopt6.d: New test. * ld-powerpc/powerpc.exp (ppc64elftests): Add it.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 7be21c7..468e8bf 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -11640,7 +11640,7 @@ toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec)
{
long adjust;
- adjust = opd->adjust[OPD_NDX (sym->st_value)];
+ adjust = opd->adjust[OPD_NDX (sym_value)];
if (adjust == -1)
/* Assume deleted functions won't ever be called. */
continue;