public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Edelsohn <dje@watson.ibm.com>
To: Doug Semler <doug@seaspace.com>
Cc: egcs@cygnus.com
Subject: Re: collect2 or AIX ld?
Date: Thu, 09 Apr 1998 21:23:00 -0000	[thread overview]
Message-ID: <9804100341.AA23930@rios1.watson.ibm.com> (raw)
In-Reply-To: <199804091821.LAA03207@seaspace.com>

>>>>> Doug Semler writes:

Doug> I was under the impression that if a library contains symbols that are
Doug> unused, the linker did not attempt to load it.  I have a library which
Doug> contains c++ code which is linked against all our code in case the
Doug> programs use the functions.  However, I get this when I try to link:

	AIX's linker is a garbage-collecting linker.  All object files and
refernced libraries are loaded, and then root symbols are traced to
determine what actually is referenced. IBM's C-Set++ has a "twolink"
option mainly meant to minimize static constructors.  I thought that
collect2 was doing something similar.

	I am not sure what interaction is occurring between libmessage and
libstdc++, but I would guess that collect2 is finding static ctors in
libmessage (and exporting them) which is pulling in that library when
listed on the link line and then that library pulls in libstdc++.

	Because of some recent changes to fix other collect2 problems,
collect2 now searches libraries listed on the linkline for static ctors as
opposed to looking at what libraries actually are referenced by the main
program during a preliminary link step. 

David

  reply	other threads:[~1998-04-09 21:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-09 18:29 Doug Semler
1998-04-09 21:23 ` David Edelsohn [this message]
1998-04-10 12:23   ` Doug Semler

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=9804100341.AA23930@rios1.watson.ibm.com \
    --to=dje@watson.ibm.com \
    --cc=doug@seaspace.com \
    --cc=egcs@cygnus.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).