This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PowerPC64 bigtoc TLS SIGILL
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 13 Apr 2010 13:34:31 +0930
- Subject: PowerPC64 bigtoc TLS SIGILL
When testing tls and bigtoc code, I found we were getting sigill on
some testcases in the gcc testsuite. The following patch fixes a
stupid linker bug.
* elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location
when optimizing high got_tlsgd/ld insns.
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.325
diff -u -p -r1.325 elf64-ppc.c
--- bfd/elf64-ppc.c 31 Mar 2010 07:53:40 -0000 1.325
+++ bfd/elf64-ppc.c 13 Apr 2010 03:35:54 -0000
@@ -11650,8 +11650,8 @@ ppc64_elf_relocate_section (bfd *output_
+ R_PPC64_GOT_TPREL16_DS);
else
{
- bfd_put_32 (output_bfd, NOP, contents + rel->r_offset);
rel->r_offset -= d_offset;
+ bfd_put_32 (output_bfd, NOP, contents + rel->r_offset);
r_type = R_PPC64_NONE;
}
rel->r_info = ELF64_R_INFO (r_symndx, r_type);
--
Alan Modra
Australia Development Lab, IBM