This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Revise Windows PECOFF weak symbols
- From: "Aaron W. LaFramboise" <aaron98wiridge9 at aaronwl dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils <binutils at sources dot redhat dot com>
- Date: Sat, 23 Oct 2004 13:55:49 -0500
- Subject: Re: [PATCH] Revise Windows PECOFF weak symbols
- References: <4174F496.4000705@aaronwl.com> <417A9687.3090406@redhat.com>
Nick Clifton wrote:
> Hi Aaron,
>
> > 2004-10-23 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
> >
> > * dlltool.c: Include <assert.h>.
> > (PREFIX_ALIAS_BASE): Define.
> > (struct export): Add member import_name;
> > (def_exports): Set import_name.
> > (make_one_lib_file): Remove prefix alias code, use import_name
> > in .idata$6.
> > (gen_lib_file): Create and delete aliases.
>
> > 2004-10-23 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
> >
> > * binutils-all/alias.def: New file.
> > * binutils-all/dlltool.exp: Two new -p tests.
> > * config/default.exp (dlltool_gas_flag): New variable.
> > Copy gas and lds executables into tmpdir/gas directory rather
> > than making symlinks which might not be supported by the host
> > OS.
> > Attempt to handle the case where the host OS does not use the
> > .exe extension but the target OS does.
> > * lib/utils-lib.exp (exe_ext): New procedure.
>
> Approved and applied.
I assume you mean the --ext-prefix-alias patch, not the weak symbols
patch that you replied to. :-)
> Note - I had to fiddle with with code you changed in th
> config/defaults.exp so that the copying of GAS and LD would work when
> the host OS does not use the .exe extension (eg Linux) whereas the
> target OS does (eg Cygwin). Maybe a better way to handle this would be
> to fix the exe_ext proc in lib/utils-lib.def ?
What do you mean? It should work on both. And my patch introduced the
exe_ext proc:
Aaron W. LaFramboise wrote:
> +
> + #
> + # exe_ext
> + # Returns target executable extension, if any.
> + #
> + proc exe_ext {} {
> + if { [istarget *-*-mingw32] || [istarget *-*-cygwin*] } {
> + return ".exe"
> + } else {
> + return ""
> + }
> + }
This is the best way I could think of for doing this, which should work
for Linux also. I couldn't think of any reasonable way to use
autoconf's EXE_EXT here, even though that would probably be better. Is
there a better way?
Aaron W. LaFramboise