public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Danny Smith <dannysmith@clear.net.nz>
To: Binutils <binutils@sourceware.org>
Subject: Re: [Patch/pe-coff] : Add native spelling of import lib names to  dynamic lib search
Date: Tue, 20 Jun 2006 08:51:00 -0000	[thread overview]
Message-ID: <000001c6943c$b8b3af50$a16d65da@anykey> (raw)


At
<http://sourceware.org/ml/binutils/2006-06/msg00294.html>
Ross Ridge wrote

> Danny Smith wrote:
> >However, the native naming convention for these import libs is
"foo.lib"
> >and gld_i386pe_open_dynamic_archive does not currently recognize this
> >name format. This means that doing something like -L/path/to/sdk
-lfoo32
> >could link directly to "foo32.dll", rather than find the import lib
> >"foo32.lib". 
> 
> Umm... doing something like -L/path/to/sdk -lfoo32 already works for
> me with ld.  Am I missing something here?
>

It finds foo32.lib after unsuccesfully going through the dynamic lib
search list, then trying to find a static lib name libfoo32.a  and
finally trying the .lib spelling in
gld_${EMULATION_NAME}_find_potential_libraries

If 'foo32.dll' is found before the import lib, 'foo32.lib', ld will
attempt direct linking to foo32.dll. This will fail if, as in platform
sdk, the symbols are exported only by aliased name.

Now  I  realize that putting a DLL in a library search path is not the
best thing to do, but it happens.

It often happens when building/testing a project and the makefile puts
the new dll and the import lib in the same  directory.

See this:
http://cygwin.com/ml/cygwin/2006-06/msg00187.html

I didn't like the answer given by the cygwin respondents.  The patch was
an alternative answer.

Danny

> 					Ross Ridge
> 

             reply	other threads:[~2006-06-20  7:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20  8:51 Danny Smith [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-06-20  7:39 Ross Ridge
2006-06-19  9:35 Danny Smith
2006-06-22 13:52 ` Nick Clifton
2006-06-24 17:32   ` Pedro Alves
2006-06-25 13:50     ` Pedro Alves
2006-06-26 12:32       ` Pedro Alves
2006-06-27 14:57         ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001c6943c$b8b3af50$a16d65da@anykey' \
    --to=dannysmith@clear.net.nz \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).