dlltool -N [PATCH]
Shaun Jackman
sjackman@gmail.com
Tue Sep 21 06:13:00 GMT 2004
I'm using dlltool to create static library wrappers around
pre-existing DLLs (such as coredll.dll and winsock.dll). The dllimport
names, such as malloc, do not have an initial underscore. gcc, otoh,
expects malloc() to be called _malloc. So, -N adds an underscore to
the external symbol, but not the dllimport name.
I'm not familiar with --ext-prefix-alias. I didn't see any reference
to it in dlltool(1). Is it a switch to another program?
Please cc me in your reply. Cheers!
Shaun
On Mon, 20 Sep 2004 20:22:04 -0500, Aaron W. LaFramboise
<aaron98wiridge9@aaronwl.com> wrote:
> Shaun Jackman wrote:
>
> > This patch adds a switch to dlltool that prefixes global symbols of
> > the static interface library with underscores, but not the import
> > name. It's used to create stub static interface libraries for
> > pre-existing DLLs that do not use underscore prefixes. I'm not sure if
> > anyone else uses this functionality, but the patch is non-invasive.
>
> Can you explain this patch in more detail?
>
> In particular, I have three questions:
>
> 1) Why is the extra underscore needed? Dlltool already adds an implicit
> leading underscore in the generated import library symbol name.
>
> 2) Why is the extra underscore not added to the dllimport __imp_ names
> as well? (I'm not talking about the name placed in the IAT.)
>
> 3) Is this related to --ext-prefix-alias?
>
> Aaron W. LaFramboise
>
>
More information about the Binutils
mailing list