|
From: | Eric Youngdale |
Subject: | Another bug in GNU ld for Win32. |
Date: | Fri, 12 Dec 2003 17:59:22 -0500 |
This is a problem that comes up when you use a Microsoft generated
import library, using MSVC >= 6. The problem is that the imports listed in
the .idata table have the wrong names - functions that have multiple leading
underscores have them all stripped, and these exports don't exist in the
referenced dll. Functions that have only a single leading underscore were
fine.
I don't know offhand about symbols that start with '?' or '@'. I would
want to see examples before I could say what is correct, I suppose.
-Eric
diff -cr orig/binutils-2.14.90-20030807-1/bfd/peicode.h
binutils-2.14.90-20030807-1/bfd/peicode.h
*** orig/binutils-2.14.90-20030807-1/bfd/peicode.h Wed Apr 30 06:22:44 2003
--- binutils-2.14.90-20030807-1/bfd/peicode.h Sun Dec 7 16:00:19 2003
***************
*** 901,909 ****
/* If necessary, trim the import symbol name. */
symbol = symbol_name;
if (import_name_type != IMPORT_NAME)
/* Skip any prefix in symbol_name. */
! while (*symbol == '@' || * symbol == '?' || * symbol == '_')
++ symbol;
if (import_name_type == IMPORT_NAME_UNDECORATE)
--- 901,913 ----
/* If necessary, trim the import symbol name. */
symbol = symbol_name;
+ /*
+ * FIXME(eric) - this is bogus - stripping these characters causes a
broken
+ * linker to be created.
+ */
if (import_name_type != IMPORT_NAME)
/* Skip any prefix in symbol_name. */
! if (*symbol == '@' || * symbol == '?' || * symbol == '_')
++ symbol;
if (import_name_type == IMPORT_NAME_UNDECORATE)
[Prev in Thread] | Current Thread | [Next in Thread] |