diff options
author | Alan Modra <amodra@gmail.com> | 2014-11-24 12:41:33 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-11-24 12:56:59 +1030 |
commit | e05fa0bad203f7236cfe374181e1bd72ccbcaa35 (patch) | |
tree | b3b4df2711cbd31ef2d8f596f40ec56f6f80b18d /bfd/elf64-ppc.c | |
parent | 1ae92035c29475c97a0795e3f93f068f8e612f25 (diff) | |
download | gdb-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.c | 2 |
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; } |