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-linux hack


We won't ever be returning to anything in crt1.o, so a toc adjustment is
fine.

	* elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
	branch to __libc_start_main.

Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.125
diff -u -p -r1.125 elf64-ppc.c
--- bfd/elf64-ppc.c	7 Aug 2003 08:38:08 -0000	1.125
+++ bfd/elf64-ppc.c	11 Aug 2003 11:25:15 -0000
@@ -7788,6 +7788,13 @@ ppc64_elf_relocate_section (bfd *output_
 		      if ((insn & 1) == 0)
 			can_plt_call = 1;
 		    }
+		  else if (h != NULL
+			   && strcmp (h->root.root.string,
+				      ".__libc_start_main") == 0)
+		    {
+		      /* Allow crt1 branch to go via a toc adjusting stub.  */
+		      can_plt_call = 1;
+		    }
 		  else
 		    {
 		      if (strcmp (input_section->output_section->name,

-- 
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]