This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFA: cygwin-specific patch for ldfile.c


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]