[Gc] Re: Latest GC cvs commit (GNU Win32)

Kai Tietz ktietz70 at googlemail.com
Thu Oct 15 11:09:37 PDT 2009

2009/10/11 NightStrike <nightstrike at gmail.com>:
> Kai would have better insight than me on this one.
> 2009/10/11 Ivan Maidanski <ivmai at mail.ru>:
>> Hi!
>> For GNU-based toolchains to follow MS convention for stdcall symbols naming rules, I've added GC_UNDERSCORE_STDCALL macro (used both at build and import) - https://bdwgc.cvs.sourceforge.net/viewvc/bdwgc/bdwgc/include/gc.h?r1=1.67&r2=1.68&sortby=date
>> If someone knows a better way for it (using a linker option), please tell me.
>> Bye.

Well, I assume that you want to produce same export table name for
those functions as they are generated by VC, isn't it? If so, approach
seems to be ok. The issue here is that symbol decoration for stdcall
are different in gcc and VC in export table.
The symbol in import library is as expected (with underscore), but in
export table name entry - ld produces, the underscore lacks. This
isn't really a bug, as it is undefined by MS documentation, and so
nearly every compiler producing different symbol names for stdcall
here. See for this https://www.geocities.com/yongweiwu/stdcall.htm


|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

More information about the Gc mailing list