From 68d6295870ad1d2f4d0a39e8fbf088a3caaaab29 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 5 Dec 2012 04:58:51 +0000 Subject: [PATCH] * elf64-ppc.c (build_plt_stub): Fix off by one error in branch to glink. --- bfd/ChangeLog | 5 +++++ bfd/elf64-ppc.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d450599a945..ce1d7046bfd 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2012-12-05 Alan Modra + + * elf64-ppc.c (build_plt_stub): Fix off by one error in branch + to glink. + 2012-12-03 Maciej W. Rozycki PR ld/10629 diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 94f3c421512..10b6f9dc104 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -9653,8 +9653,8 @@ build_plt_stub (struct ppc_link_hash_table *htab, bfd_vma glinkoff = GLINK_CALL_STUB_SIZE + pltindex * 8; bfd_vma to, from; - if (pltindex > 32767) - glinkoff += (pltindex - 32767) * 4; + if (pltindex > 32768) + glinkoff += (pltindex - 32768) * 4; to = (glinkoff + htab->glink->output_offset + htab->glink->output_section->vma); -- 2.30.2