public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@cygnus.com>
To: hjl@nynexst.com
Cc: dholland@husc.harvard.edu, gas2@cygnus.com
Subject: Re: problems with ld from binutils 2.5.2l.20
Date: Mon, 11 Sep 1995 12:34:00 -0000	[thread overview]
Message-ID: <199509111934.PAA19698@sanguine.cygnus.com> (raw)
In-Reply-To: <9508031349.AA10077@nynexst.com>

   From: hjl@nynexst.com (H.J. Lu)
   Date: Thu, 3 Aug 95 9:49:19 EDT

   >  > For the GNU linker, -L applies to all -l's.
   > 
   > This behavior is wrong. First, it makes no sense, since the order of
   > -l's is significant, and second, it makes it impossible to control
   > which copies of which libraries are linked with, which could be
   > significant. 
   > 

   The problem is twofold:

   1. gcc will re-arrange the order of -L's and -l's. It puts -L's ahead of
      -l's.
   2. One -L list is used fo all libraries in the linker.

   We have to change both gcc and ld to do the "right" thing.

I started to think about implementing this, but then I realized that I
don't understand it.  As far as I can tell, it only makes a difference
when an archive does not exist.

Support you run
    ld -Lfoo -lfoo -Lbar -lbar
The proposed change appears to argue that the -Lbar should not apply
to the -lfoo.  However, that only matters if foo/libfoo.a does not
exist.

So, it does not make it impossible to control which libraries are used
in the link.  In fact, this change would not affect what libraries are
included in the link at all, except that the linker would sometimes
fail in cases where it currently succeeds.

It doesn't seem worth making this change.  As I noted earlier, the
current linker behaviour is compatible with the SunOS linker.

Ian


  parent reply	other threads:[~1995-09-11 12:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9508021833.AA27238@husc7.harvard.edu>
1995-08-03  6:53 ` H.J. Lu
1995-08-03  8:29   ` Ian Lance Taylor
1995-09-11 12:34   ` Ian Lance Taylor [this message]
1995-09-11 13:05     ` Richard Stallman
1995-09-12  3:43       ` Wolfgang Stukenbrock

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=199509111934.PAA19698@sanguine.cygnus.com \
    --to=ian@cygnus.com \
    --cc=dholland@husc.harvard.edu \
    --cc=gas2@cygnus.com \
    --cc=hjl@nynexst.com \
    /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).