This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb/binutils-2_29-branch] PowerPC64 stubs don't match calculated size
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 19 Sep 2017 07:15:10 -0000
- Subject: [binutils-gdb/binutils-2_29-branch] PowerPC64 stubs don't match calculated size
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=910201669dca1cb57c583e0d63d1369388a3375d
commit 910201669dca1cb57c583e0d63d1369388a3375d
Author: Alan Modra <amodra@gmail.com>
Date: Tue Sep 19 13:22:49 2017 +0930
PowerPC64 stubs don't match calculated size
After the PR 21411 fix, the linker generated .eh_frame for ppc64 glink
can be edited by the generic code. The sequence of events goes
something like:
1) Some object file adds .eh_frame aligned to 8, making the output
.eh_frame aligned to at least 8, so linker generated .eh_frame FDE
is padded to an 8 byte boundary.
2) All .eh_frame past the glink .eh_frame is garbage collected.
3) Generic code detects that last FDE (the glink .eh_frame) doesn't
need to be padded to an 8 byte boundary, reducing size from 88 to
84.
4) elf64-ppc.c check fails.
PR 21441
* elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
size.
(cherry picked from commit 25516cc573ff3551a7ac0538e1d3de5811c7199e)
Diff:
---
bfd/ChangeLog | 6 ++++++
bfd/elf64-ppc.c | 7 +------
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index fac3150..87b7973 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2017-09-19 Alan Modra <amodra@gmail.com>
+ PR 21441
+ * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
+ size.
+
+2017-09-19 Alan Modra <amodra@gmail.com>
+
PR 22150
* elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
symbols before calculating verrefs. Don't renumber dynsyms
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 3f01ae6..277bb0e 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -13407,12 +13407,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info,
break;
}
- /* Note that the glink_eh_frame check here is not only testing that
- the generated size matched the calculated size but also that
- bfd_elf_discard_info didn't make any changes to the section. */
- if (group != NULL
- || (htab->glink_eh_frame != NULL
- && htab->glink_eh_frame->rawsize != htab->glink_eh_frame->size))
+ if (group != NULL)
{
htab->stub_error = TRUE;
info->callbacks->einfo (_("%P: stubs don't match calculated size\n"));