From: "Dave Korn" <dk@artimi.com>
To: <binutils@sources.redhat.com>
Subject: RE: Patch of dlltool for enhanced dll-stub creation@rsl-sie.de
Date: Mon, 17 May 2004 16:39:00 -0000 [thread overview]
Message-ID: <NUTMEGh8s4KWiGtXsL100000130@NUTMEG.CAM.ARTIMI.COM> (raw)
In-Reply-To: <40A8E3FA.400@rsl-sie.de>
> -----Original Message-----
> From: binutils-owner On Behalf Of Mark Junker
> Sent: 17 May 2004 17:11
> Hi,
>
> I created a patch for dlltool.c that allows all Win32-DLL
> users to use a
> DEF file with EXPORTS of the form
>
> external_name = internal_name
>
> and the created archive contains an export with "external_name" but
> it'll call the DLL function "internal_name".
>
> We needed this because we had to use a 3rd party DLL that contains
> __stdcall functions *without* the @n at the end of the names ...
You have heard about the '--enable-stdcall-fixup' option to ld, right? I
believe it does what you want:
-------------------snip-------------------
"`--enable-stdcall-fixup'
`--disable-stdcall-fixup'
If the link finds a symbol that it cannot resolve, it will attempt
to do "fuzzy linking" by looking for another defined symbol that
differs only in the format of the symbol name (cdecl vs stdcall)
and will resolve that symbol by linking to the match. For
example, the undefined symbol `_foo' might be linked to the
function `_foo@12', or the undefined symbol `_bar@16' might be
linked to the function `_bar'. When the linker does this, it
prints a warning, since it normally should have failed to link,
but sometimes import libraries generated from third-party dlls may
need this feature to be usable. If you specify
`--enable-stdcall-fixup', this feature is fully enabled and
warnings are not printed. If you specify
`--disable-stdcall-fixup', this feature is disabled and such
mismatches are considered to be errors."
-------------------snip-------------------
However, your patch is more widely generalized than that, and might well
be of use in other circumstances.
cheers,
DaveK
--
Can't think of a witty .sigline today....
prev parent reply other threads:[~2004-05-17 16:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-17 16:10 Mark Junker
2004-05-17 16:39 ` Dave Korn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=NUTMEGh8s4KWiGtXsL100000130@NUTMEG.CAM.ARTIMI.COM \
--to=dk@artimi.com \
--cc=binutils@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).