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]

Re: Linux/ppc failure


On Wed, Oct 02, 2002 at 05:46:21PM +0930, Alan Modra wrote:
> On Tue, Oct 01, 2002 at 11:28:19PM -0700, H. J. Lu wrote:
> > FAIL: Reloc section order
> > 
> > when I ran it on Linux/x86.
> 
> A result of changes to elf32-ppc.c you have in your version of
> binutils.
> 

Ok. I modified the change a little bit to match Jakub's original
ChangeLog entry.


H.J.
---
2002-10-02  H.J. Lu <hjl@gnu.org>

	* elf32-ppc.c (ppc_elf_check_relocs): Do output relocations for
	non-debugging sections.
	(ppc_elf_relocate_section): Likewise.

2001-10-07  Jakub Jelinek  <jakub@redhat.com>

	* elf32-ppc.c (ppc_elf_check_relocs): Don't output relocations
	for debugging sections.
	(ppc_elf_relocate_section): Likewise.

Index: elf32-ppc.c
===================================================================
RCS file: /export//cvs/gnu/binutils/bfd/elf32-ppc.c,v
retrieving revision 1.1.1.42
retrieving revision 1.45
diff -u -p -r1.1.1.42 -r1.45
--- elf32-ppc.c	21 Sep 2002 16:16:42 -0000	1.1.1.42
+++ elf32-ppc.c	2 Oct 2002 16:15:31 -0000	1.45
@@ -2420,7 +2420,9 @@ ppc_elf_check_relocs (abfd, info, sec, r
 	  /* fall through */
 
 	default:
-	  if (info->shared)
+	  if (info->shared
+	      && ((sec->flags & SEC_DEBUGGING) == 0
+		  || (sec->flags & SEC_ALLOC) != 0))
 	    {
 #ifdef DEBUG
 	      fprintf (stderr, "ppc_elf_check_relocs need to create relocation for %s\n",
@@ -3178,7 +3180,9 @@ ppc_elf_relocate_section (output_bfd, in
 	case (int) R_PPC_ADDR14:
 	case (int) R_PPC_UADDR32:
 	case (int) R_PPC_UADDR16:
-	  if (info->shared && r_symndx != 0)
+	  if (info->shared && r_symndx != 0
+	      && ((input_section->flags & SEC_DEBUGGING) == 0
+		  || (input_section->flags & SEC_ALLOC) != 0))
 	    {
 	      Elf_Internal_Rela outrel;
 	      int skip;


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