]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR ld/815
authorAlan Modra <amodra@gmail.com>
Fri, 15 Apr 2005 03:52:53 +0000 (03:52 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 15 Apr 2005 03:52:53 +0000 (03:52 +0000)
* elflink.c (elf_smash_syms): Clear undef.next if it's not being
used as a list pointer.

bfd/ChangeLog
bfd/elflink.c

index b8e236bbd7f11a772126033abe8cac7c29c7e733..36945c61c54cc719c45e23676aeb94c0faf55fd7 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-15  Alan Modra  <amodra@bigpond.net.au>
+
+       PR ld/815
+       * elflink.c (elf_smash_syms): Clear undef.next if it's not being
+       used as a list pointer.
+
 2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
 
        * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
index 0554a0fdc32b19c8a770bade8fb9d6844830e405..914096c017f41144535a85d58db2a986dd2e48a2 100644 (file)
@@ -2932,8 +2932,11 @@ elf_smash_syms (struct elf_link_hash_entry *h, void *data)
   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,