This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

powerpc64 multi-toc linker bug


This fixes a bug in ppc64_elf_size_stubs.  The bug could result in an r2
adjusting stub being omitted when it was in fact needed.  Which might be
the cause of a gcc bootstrap miscompilation some people are seeing.

	* elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
	toc adjusting stub, do not test source section flags.

Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.182
diff -u -p -r1.182 elf64-ppc.c
--- bfd/elf64-ppc.c	19 Dec 2004 23:24:46 -0000	1.182
+++ bfd/elf64-ppc.c	6 Jan 2005 08:38:44 -0000
@@ -8643,8 +8643,7 @@ ppc64_elf_size_stubs (bfd *output_bfd,
 			  && code_sec->output_section != NULL
 			  && (htab->stub_group[code_sec->id].toc_off
 			      != htab->stub_group[section->id].toc_off)
-			  && code_sec->has_gp_reloc
-			  && section->has_gp_reloc)
+			  && code_sec->has_gp_reloc)
 			stub_type = ppc_stub_long_branch_r2off;
 		    }
 
-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]