aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-11-24 12:41:33 +1030
committerAlan Modra <amodra@gmail.com>2014-11-24 12:56:59 +1030
commite05fa0bad203f7236cfe374181e1bd72ccbcaa35 (patch)
treeb3b4df2711cbd31ef2d8f596f40ec56f6f80b18d /bfd/elf64-ppc.c
parent1ae92035c29475c97a0795e3f93f068f8e612f25 (diff)
downloadgdb-e05fa0bad203f7236cfe374181e1bd72ccbcaa35.zip
gdb-e05fa0bad203f7236cfe374181e1bd72ccbcaa35.tar.gz
gdb-e05fa0bad203f7236cfe374181e1bd72ccbcaa35.tar.bz2
PowerPC64 --plt-align
Alignment of plt stubs was broken, firstly because the option was being dropped due to the alignment value not being set in the "params" struct used in elf64-ppc.c, and secondly due to not calculating the number of alignment boundary crossings correctly. bfd/ * elf64-ppc.c (plt_stub_pad): Correct. ld/ * ld.texinfo: Correct --plt-align documentation. * emultempl/ppc64elf.em (plt_stub_align): Delete. Use and set params.plt_stub_align instead.
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 0245a2c..c1029df 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -10209,7 +10209,7 @@ plt_stub_pad (struct ppc_link_hash_table *htab,
bfd_vma stub_off = stub_entry->stub_sec->size;
if (((stub_off + stub_size - 1) & -stub_align) - (stub_off & -stub_align)
- > (stub_size & -stub_align))
+ > ((stub_size - 1) & -stub_align))
return stub_align - (stub_off & (stub_align - 1));
return 0;
}