From: Aaron W. L. <aar...@aa...> - 2004-06-29 05:20:55
|
Please see my comments at http://sources.redhat.com/ml/binutils/2004-06/msg00544.html EXPORTS name = internal_name What does internal_name represent? Does it even do anything? While it is carried from input .def to output .def, it does not appear to be put into either output import libraries or output .exp's. I notice that Mumit Khan added an option --add-stdcall-alias to dlltool, but how can this possibly do anything if aliases do not seem to do anything? Aaron W. LaFramboise |
From: Wu Y. <ad...@ne...> - 2004-06-29 12:48:14
|
Aaron W. LaFramboise wrote: > Can someone explain to me what internal_name is supposed to mean? I > can't find it documented anywhere what exactly its meaning is! > > EXPORTS > name = internal_name > > What does internal_name represent? Does it even do anything? > While it > is carried from input .def to output .def, it does not appear > to be put > into either output import libraries or output .exp's. As Mr Korn said in the binutils list, this is the alias. The left side is the exported name in the DLL, and the right the public name in the .o (or .obj) file. Also note that this line has minor differences for different tools, which are explained in http://mywebpage.netscape.com/yongweiwu/stdcall.htm for MSVC 6 and MinGW/BinUtils. In the case of binutils, ld and dllwrap behaves a little differently on exporting names. One thing I am not sure of is how to create a import library with one arbitrary entry mapping to another arbitrary exported name in a DLL. The above alias is a mapping from the name in .dll to that in .o, not from import library to dll. --- Luckily the most common mapping needed can be done with --add-stdcall-alias and --kill-at. --- The Digital Mars implib tool can do that (the MS lib tool cannot do that), but that is another story (and file formats are incompatible). Best regards, Yongwei |