This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH cygwin/mingw32] Committed: Fix dllimport of stdcall and fastcall symbols.
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: GCC-patches <gcc-patches at gcc dot gnu dot org>
- Cc: Dave Korn <dave dot korn at artimi dot com>
- Date: Tue, 11 Sep 2007 13:46:04 +1200
- Subject: [PATCH cygwin/mingw32] Committed: Fix dllimport of stdcall and fastcall symbols.
The rewrite of i386-PE dllimport code
http://gcc.gnu.org/viewcvs?view=rev&revision=123344
broke the dllimport of stdcall and fastcall functions. The problem was
that the use of i386_pe_strip_name_encoding full as the
TARGET_STRIP_NAME_ENCODING hook was causing '@' and prefixes to be
stripped from the external name.
The only time that we need to strip these decorations (and then mainly
for backward compatibility) is when generating a unique section name.
Since that is done in winnt.c (i386_pe_unique_section), we can can use
i386_pe_strip_name_encoding_full directly rather than as a hook
function.
Committed to trunk.
2007-09-11 Danny Smith <dannysmith@users.sourceforge.net>
* config/i386/cygming.h (TARGET_STRIP_NAME_ENCODING): Don't
override default.
* config/i386/i386.c (get_dllimport_decl): Don't strip
FASTCALL_PREFIX.