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: PR/338 (assertion in bfd_link_add_undef in linker.c)


On Wed, Nov 24, 2004 at 09:35:23PM +1030, Alan Modra wrote:
> On Wed, Nov 24, 2004 at 11:42:58AM +0100, Jan Beulich wrote:
> > Isn't the change implemented to fix this problem insufficient in that it
> > does not cover the case where the symbol is already on the undefined
> > chain, but also is the last one there?

Actually the fix is so easy I'll commit it now.

ld/ChangeLog
	* ldexp.c (fold_name): Correct PR 338 fix.

Index: ld/ldexp.c
===================================================================
RCS file: /cvs/src/src/ld/ldexp.c,v
retrieving revision 1.39
diff -u -p -r1.39 ldexp.c
--- ld/ldexp.c	19 Nov 2004 09:31:53 -0000	1.39
+++ ld/ldexp.c	24 Nov 2004 11:28:45 -0000
@@ -600,7 +600,7 @@ fold_name (etree_type *tree,
 	    {
 	      h->type = bfd_link_hash_undefined;
 	      h->u.undef.abfd = NULL;
-	      if (h->u.undef.next == NULL)
+	      if (h->u.undef.next == NULL && h != link_info.hash->undefs_tail)
 		bfd_link_add_undef (link_info.hash, h);
 	    }
 	}

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