This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: dlltool -N [PATCH]
> This is a transcript from a terminal using vanilla release binutils 2.15
> on i686-pc-mingw32:
>
> $ cat elishacuthbert.def
> LIBRARY elishacuthbert.dll
> EXPORTS
> gorgeous
> $ dlltool -d elishacuthbert.def -l libelishacuthbert.a
> $ objdump -t libelishacuthbert.a | grep gorgeous
> [ 7](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _gorgeous
> [ 8](sec 5)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __imp__gorgeous
> $
>
> Notice that dlltool has already added a single leading underscore to the
> imported external symbol asm name, as per the ABI. (The other __imp__
> name is the dllimport name.)
Here's the same transcript with arm-wince-pe:
$ cat elishacuthbert.def
LIBRARY elishacuthbert.dll
EXPORTS
gorgeous
$ arm-wince-pe-dlltool -d elishacuthbert.def -l libelishacuthbert.a
$ arm-wince-pe-objdump -t libelishacuthbert.a | grep gorgeous
[ 7](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 gorgeous
[ 8](sec 5)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __imp_gorgeous
Notice there's no leading underscore. Now with -N:
$ arm-wince-pe-dlltool -N -d elishacuthbert.def -l libelishacuthbert.a
$ arm-wince-pe-objdump -t libelishacuthbert.a | grep gorgeous
[ 7](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _gorgeous
[ 8](sec 5)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 __imp_gorgeous
Notice that this still differs from your above example,
__imp__gorgeous, which has an additional underscore.
Cheers,
Shaun