diff options
author | Charles Wilson <cygwin@cwilson.fastmail.fm> | 2001-08-02 23:05:54 +0000 |
---|---|---|
committer | Charles Wilson <cygwin@cwilson.fastmail.fm> | 2001-08-02 23:05:54 +0000 |
commit | 8ceb7a1b8e7893e3859433dd99174055a6d47aad (patch) | |
tree | d5eaa323f8e2e3754eff1bd557cfef72d85b4c1d /bfd/linker.c | |
parent | decc3638003f7c461b0870e45aa8f179ea501208 (diff) | |
download | gdb-8ceb7a1b8e7893e3859433dd99174055a6d47aad.zip gdb-8ceb7a1b8e7893e3859433dd99174055a6d47aad.tar.gz gdb-8ceb7a1b8e7893e3859433dd99174055a6d47aad.tar.bz2 |
2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
* cofflink.c (coff_link_check_ar_symbols): also search for
__imp__symbol as well as _symbol.
* linker.c (_bfd_generic_link_add_archive_symbols): also
search for __imp__symbol as well as _symbol.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r-- | bfd/linker.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/bfd/linker.c b/bfd/linker.c index 5478186..1144e92 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -1003,10 +1003,20 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn) arh = archive_hash_lookup (&arsym_hash, h->root.string, false, false); if (arh == (struct archive_hash_entry *) NULL) { - pundef = &(*pundef)->next; - continue; + /* If we haven't found the exact symbol we're looking for, + let's look for its import thunk */ + if (info->pei386_auto_import) + { + char *buf = alloca (strlen (h->root.string) + 10); + sprintf (buf, "__imp_%s", h->root.string); + arh = archive_hash_lookup (&arsym_hash, buf, false, false); + } + if (arh == (struct archive_hash_entry *) NULL) + { + pundef = &(*pundef)->next; + continue; + } } - /* Look at all the objects which define this symbol. */ for (l = arh->defs; l != (struct archive_list *) NULL; l = l->next) { |