[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/351] New: [PATCH] dlltool doesn't honour aliases in .def f
carlo at alinoe dot com
[Bug binutils/351] New: [PATCH] dlltool doesn't honour aliases in .def files.
29 Aug 2004 15:08:08 -0000
I added i686-pc-mingw32 as target triplet, although this is
in fact a platform independ bug (but since dlltool is only
useful on win32 ...).
A general EXPORTS line in the .def file is:
exportedname [[= internalname] @ ordinal [flags]]
If the internalname is not given, then normally
the same name as the exportedname is used. However,
one can specify the -U commandline parameter to dlltool
to add an underscore (so that internalname become _exportedname)
and one can specify -k, which removes the stdcall @<n>
part if any (for example, when exportedname is "address@hidden"
then internalname becomes "foobar").
However, the current dlltool implementation contains a bug
that allows one to specify the internal name itself in .def
file - as should be possible according the documentation
of the .def file.
Because both -U and -k seem to be kludgy fixes, I think that
in the case of an explicitely given internalname, this
translation should not take place.
I wrote a patch and tested it (it works ;). I will attach
Note that this fix is especially important on mingw because
gcc does not add the leading underscore to stdcall functions.
That means that a .dll can export the internal name "address@hidden"
while gcc applications try to call "address@hidden". When generating
the stub for the import library we NEED a line
address@hidden = address@hidden
in the .def file. Unless there are ONLY stdcall functions being
exported there is no other way to create a correct import library
(when there are only stdcall functions then one can the -U option).
Summary: [PATCH] dlltool doesn't honour aliases in .def files.
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: carlo at alinoe dot com
CC: bug-binutils at gnu dot org
GCC target triplet: i686-pc-mingw32
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/351] New: [PATCH] dlltool doesn't honour aliases in .def files.,
carlo at alinoe dot com <=