diff options
author | Alan Modra <amodra@gmail.com> | 2005-04-15 03:42:46 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-04-15 03:42:46 +0000 |
commit | 2e8b3a6111f4c47681ccbbfcc28e525c78160100 (patch) | |
tree | 6bfae1d286e5a0f828294d6076328e7ec52ce4c8 /bfd/elflink.c | |
parent | 86fc41d1febea4ffb400ef33aebd8ed72dd6b638 (diff) | |
download | gdb-2e8b3a6111f4c47681ccbbfcc28e525c78160100.zip gdb-2e8b3a6111f4c47681ccbbfcc28e525c78160100.tar.gz gdb-2e8b3a6111f4c47681ccbbfcc28e525c78160100.tar.bz2 |
PR ld/815
* elflink.c (elf_smash_syms): Clear undef.next if it's not being
used as a list pointer.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 09d0616..017ebe4 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2935,8 +2935,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, |