This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello DLLs built with MS-Windows tools use different default rules for the naming of __stdcall function names in export table: for stdcall symbols the string in the dll's export table has the assembler prefix '_' prepended, while for cdecl symbols or variable names, the underscore prefix is stripped. In contrast, in dlls built with GNU tools, the assembler underscore prefix is stripped from all symbols by default. The -U (--add-underscore) dlltool option is not generally suitable for fixing up this incompatibility when creating GNU-compatible import libs for 3rd party dll's that were built with MS tools, since it adds underscores to all symbols, not just __stdcall ones. The attached patch adds a new long option to prepend underscores to stdcall symbols only. binutils/ChangeLog 2006-03-07 Danny Smith <dannysmith@users.sourceforge.net> * dlltool.c (add_stdcall_underscore): New flag. (xlate): Also add underscore to stdcall symbol if add_stdcall_underscore set. (usage): Document --add-stdcall-underscore option. (OPTION_ADD_STDCALL_UNDERSCORE): New define. (long_options): Use it for --add-stdcall-underscore option. (main): Handle it. * doc/binutils.texi: Document --add-stdcall-underscore option and differentiate from --add-underscore.
Attachment:
add-stdcall-underscore.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |