diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-07-19 19:08:33 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-07-19 19:08:33 +0000 |
commit | accc7f694094a73425c5a72500888a110b239e4b (patch) | |
tree | 91c8a1feb27f5588306877256d21cb56e09af062 /bfd/elflink.h | |
parent | e50d80767cdc2d1aa286dde1ef9feb03fee7be2e (diff) | |
download | gdb-accc7f694094a73425c5a72500888a110b239e4b.zip gdb-accc7f694094a73425c5a72500888a110b239e4b.tar.gz gdb-accc7f694094a73425c5a72500888a110b239e4b.tar.bz2 |
* elflink.h (elf_merge_symbol): Do merge symbols from the same BFD
if they appear to be specially created by the linker.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r-- | bfd/elflink.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h index 1e88b63..6fb9bba 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -368,8 +368,12 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, /* In cases involving weak versioned symbols, we may wind up trying to merge a symbol with itself. Catch that here, to avoid the confusion that results if we try to override a symbol with - itself. */ - if (abfd == oldbfd) + itself. The additional tests catch cases like + _GLOBAL_OFFSET_TABLE_, which are regular symbols defined in a + dynamic object, which we do want to handle here. */ + if (abfd == oldbfd + && ((abfd->flags & DYNAMIC) == 0 + || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)) return true; /* NEWDYN and OLDDYN indicate whether the new or old symbol, |