public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Another fix for PR815
@ 2005-04-15  3:37 Alan Modra
  2005-04-15 11:53 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2005-04-15  3:37 UTC (permalink / raw)
  To: binutils

This is another fix for bugs noted in PR815.  If you read the comments
in the PR, you'll see that I haven't worked out exactly how the problem
is occurring, so there is a good chance that further patches are
needed.  However, I'm sure that this patch is correct even if it might
not be a complete fix.

	PR ld/815
	* elflink.c (elf_smash_syms): Clear undef.next if it's not being
	used as a list pointer.

Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.145
diff -u -p -r1.145 elflink.c
--- bfd/elflink.c	13 Apr 2005 16:44:08 -0000	1.145
+++ bfd/elflink.c	14 Apr 2005 23:15:51 -0000
@@ -2935,8 +2935,11 @@ elf_smash_syms (struct elf_link_hash_ent
   if (h->ref_regular)
     abort ();
 
-  /* Set sym back to newly created state, but keep undefs list pointer.  */
+  /* Set sym back to newly created state, but keep undef.next if it is
+     being used as a list pointer.  */
   bh = h->root.u.undef.next;
+  if (bh == &h->root)
+    bh = NULL;
   if (bh != NULL || inf->htab->root.undefs_tail == &h->root)
     inf->twiddled = TRUE;
   (*inf->htab->root.table.newfunc) (&h->root.root,

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Another fix for PR815
  2005-04-15  3:37 Another fix for PR815 Alan Modra
@ 2005-04-15 11:53 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2005-04-15 11:53 UTC (permalink / raw)
  To: binutils

On Fri, Apr 15, 2005 at 01:07:51PM +0930, Alan Modra wrote:
> This is another fix for bugs noted in PR815.  If you read the comments
> in the PR, you'll see that I haven't worked out exactly how the problem
> is occurring, so there is a good chance that further patches are
> needed.

Well, now I have worked out how it's happening, and I'm satisfied that
the patch I committed should fix the problem.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-15 11:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-15  3:37 Another fix for PR815 Alan Modra
2005-04-15 11:53 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).