Correct powerpc64le __glink_PLTresolve .eh_frame FDE

Alan Modra amodra@gmail.com
Sat Oct 17 09:52:00 GMT 2015


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



More information about the Binutils mailing list