This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Correct powerpc64le __glink_PLTresolve .eh_frame FDE
- From: Alan Modra <amodra at gmail dot com>
- To: Kevin Fletcher <Kevin dot Fletcher at microfocus dot com>, binutils at sourceware dot org
- Cc: "sjmunroe at us dot ibm dot com" <sjmunroe at us dot ibm dot com>, Ed Airey <Ed dot Airey at microfocus dot com>
- Date: Sat, 17 Oct 2015 20:22:36 +1030
- Subject: Correct powerpc64le __glink_PLTresolve .eh_frame FDE
- Authentication-results: sourceware.org; auth=none
- References: <23E490AC-31D7-4E65-A35A-3304242A64A5 at microfocus dot com>
On Fri, Oct 16, 2015 at 12:26:11PM +0000, Kevin Fletcher wrote:
> DW_CFA_register: r65 in r12
This is a linker bug since the FDE for __glink_PLTresolve is linker
generated. eh_frame is OK for ELFv1 but wrong for ELFv2 where lr is
saved in r0.
* elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve
eh_frame FDE for ELFv1.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index e5344df..cda8e59 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -12583,7 +12583,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info)
*p++ = DW_CFA_advance_loc + 1;
*p++ = DW_CFA_register;
*p++ = 65;
- *p++ = 12;
+ *p++ = htab->opd_abi ? 12 : 0;
*p++ = DW_CFA_advance_loc + 4;
*p++ = DW_CFA_restore_extended;
*p++ = 65;
--
Alan Modra
Australia Development Lab, IBM