On Wed, Dec 09, 2009 at 01:28:03PM +0100, Kai Tietz wrote:
2009/12/9 Richard W.M. Jones <rjones(a)redhat.com>:
> On Tue, Dec 08, 2009 at 09:37:18AM -0600, Michael Cronenworth wrote:
>> I'm attempting to generate a DLL and I think I stumbled upon an issue,
>> or possibly I don't know how to use dlltool.
>> $ i686-pc-mingw32-dlltool --export-all-symbols --output-def test.def
>> I get all symbols in the expected format, eg:
>> memcpy @ 248
>> That's how I expect that command to work, however, this command:
>> $ i686-pc-mingw32-dlltool --kill-at --export-all-symbols --output-def
>> test.def libtest.dll
>> I get all symbols exactly the same as before, eg:
>> memcpy @ 248
>> I expected:
>> Is this a bug or am I doing something wrong? (using -k makes no difference)
> I get the same results, and it looks like a bug to me.
This isn't a bug. What you see here is <symbol> space '@' space
<digit>. This is the typing of the ordinal used for the symbol and is
not the decoration.
At the very least, the documentation is confusing. It says:
Specifies that when `dlltool' is creating the exports file it
should not append the string `@ <number>'. These numbers are
called ordinal numbers and they represent another way of accessing
the function in a DLL, other than by name.
That implies to me that the @ <space> <number> part should be removed.
The --kill-at option has no effect at all on the output, except to
change a comment:
$ i686-pc-mingw32-dlltool --kill-at --export-all-symbols --output-def /tmp/withkill.def
$ i686-pc-mingw32-dlltool --export-all-symbols --output-def /tmp/withoutkill.def
$ diff -u /tmp/withkill.def /tmp/withoutkill.def
--- /tmp/withkill.def 2009-12-09 14:13:16.119384036 +0000
+++ /tmp/withoutkill.def 2009-12-09 14:13:24.350383990 +0000
@@ -1,4 +1,4 @@
-; i686-pc-mingw32-dlltool --kill-at --export-all-symbols --output-def /tmp/withkill.def
+; i686-pc-mingw32-dlltool --export-all-symbols --output-def /tmp/withoutkill.def
".weak.__Jv_RegisterClasses.___gcc_register_frame" @ 1 DATA
AdjustWindowRect@12 @ 2
So I still maintain that this is a bug in _something_, perhaps in
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd