This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: Correct powerpc64le __glink_PLTresolve .eh_frame FDE
- From: Ed Airey <Ed dot Airey at microfocus dot com>
- To: Alan Modra <amodra at gmail dot com>, Kevin Fletcher <Kevin dot Fletcher at microfocus dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: "sjmunroe at us dot ibm dot com" <sjmunroe at us dot ibm dot com>, Scot Nielsen <Scot dot Nielsen at microfocus dot com>
- Date: Sat, 17 Oct 2015 11:48:46 +0000
- Subject: RE: Correct powerpc64le __glink_PLTresolve .eh_frame FDE
- Authentication-results: sourceware.org; auth=none
- References: <23E490AC-31D7-4E65-A35A-3304242A64A5 at microfocus dot com> <20151017095236 dot GE13961 at bubble dot grove dot modra dot org>
Adding Scot Nielsen into this discussion too.
Thanks,
-Ed
-----Original Message-----
From: Alan Modra [mailto:amodra@gmail.com]
Sent: Saturday, October 17, 2015 5:53 AM
To: Kevin Fletcher <Kevin.Fletcher@microfocus.com>; binutils@sourceware.org
Cc: sjmunroe@us.ibm.com; Ed Airey <Ed.Airey@microfocus.com>
Subject: Correct powerpc64le __glink_PLTresolve .eh_frame FDE
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