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]

Fix ppc64 recursive function call


Fixes recursive calls in shared libs, where we went via a call stub
rather than directly.  I think I had this right at one stage, and
probably introduced the problem with my 2004-08-09 changes.

	* elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
	when !can_plt_call.

Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.217
diff -u -p -r1.217 elf64-ppc.c
--- bfd/elf64-ppc.c	8 Jul 2005 06:20:02 -0000	1.217
+++ bfd/elf64-ppc.c	12 Jul 2005 09:40:53 -0000
@@ -9998,6 +9998,8 @@ ppc64_elf_relocate_section (bfd *output_
 		      br = bfd_get_32 (input_bfd, contents + rel->r_offset);
 		      if ((br & 1) == 0)
 			can_plt_call = TRUE;
+		      else
+			stub_entry = NULL;
 		    }
 		  else if (h != NULL
 			   && strcmp (h->elf.root.root.string,

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