This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: RFA: cygwin-specific patch for ldfile.c
- To: Ian Lance Taylor <ian at zembu dot com>
- Subject: Re: RFA: cygwin-specific patch for ldfile.c
- From: "Charles S. Wilson" <cwilson at ece dot gatech dot edu>
- Date: Tue, 16 May 2000 14:02:14 -0400
- CC: binutils at sourceware dot cygnus dot com, khan at nanotech dot wisc dot edu, dj at delorie dot com
- References: <3920D5A1.2DC739CB@ece.gatech.edu> <20000516144749.9641.qmail@daffy.airs.com>
Ian Lance Taylor wrote:
>
> Date: Tue, 16 May 2000 00:59:13 -0400
> From: "Charles S. Wilson" <cwilson@ece.gatech.edu>
> X-Accept-Language: en
> CC: khan@nanotech.wisc.dot.edu, dj@delorie.com
> Content-Type: text/plain; charset=us-ascii
>
> The following patch to binutils/ld/ldfile.c allows ld to search the
> library path for foo.dll and libfoo.dll, prior to searching for
> libfoo.a, in response to a '-lfoo' argument if linking is dynamic
> (-Bdynamic). This takes advantage of the recent ability of ld to link
> against a dll without an explicit import library (that is, generating an
> implicit import lib from the dll on-the-fly)
>
> Thanks. Your patch isn't right, though, since you are testing a
> target characteristic with a host #ifdef, which is pretty much always
> wrong in the binutils. Look at the open_dynamic_archive emulation
> entry point.
>
Okay. You can understand my confusion, though, since right next to the
spot affected by my patch is an '#ifdef VMS' block. Oh, well -- I'm
working on a patch to ld/emultempl/pe.em instead, adding
gld_${EMULATION_NAME}_open_dynamic_archive. However, this has the
following drawback (benefit?):
It will cause all architecutres that use i386-pe emulation to attempt to
link directly with foo.dll & libfoo.dll in preference to libfoo.a, when
-Bdynamic. (That is, generating an implicit import library directly from
the dll) I'm not sure this capability exists for anything but the cygwin
build, and I can't test anything but the cygwin build.
--Chuck