public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Erik Rull <erik.rull@rdsoftware.de>
To: "John (Eljay) Love-Jensen" <eljay@adobe.com>
Cc: GCC-help <gcc-help@gcc.gnu.org>
Subject: Re: Transitive Linking fails
Date: Thu, 18 Mar 2010 00:50:00 -0000	[thread overview]
Message-ID: <4BA16A4F.2010507@rdsoftware.de> (raw)
In-Reply-To: <C7C3D857.1AA39%eljay@adobe.com>

Hi John,

John (Eljay) Love-Jensen wrote:
> dir1/*.o dir2/libx.a -> dir3/liby.so
> 
> The point to -static is to prefer libx.a rather than libx.so when you ask
> for -lx.

Well, the linking itself was now fine, but I've got new problems in parts 
of the software that do not use parts of the library. When I link the .o 
files directly into the shared object, then I have no problem, the software 
runs fine then.
I've built the lib using
$(AR) rcs libx.a obj1.o obj2.o
where $(AR) put out "ar"

> HTH,
> --Eljay
> 

As far as I understood it these two commands should result in the same file:

(with the command above)
$(LD) (shared object options) libshared.so libx.a obj5.o obj6.o
and
$(LD) (shared object options) libshared.so obj1.o obj2.o obj5.o obj6.o

right or not? If not what must be done to make these two lines behaviour 
equivalent? or must I take -static -lx?

Best regards,

Erik



  reply	other threads:[~2010-03-17 23:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 17:28 Erik Rull
2010-03-15 19:17 ` John (Eljay) Love-Jensen
2010-03-18  0:50   ` Erik Rull [this message]
2010-03-18 12:45     ` John (Eljay) Love-Jensen
2010-03-16 15:57 ` Ian Lance Taylor

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=4BA16A4F.2010507@rdsoftware.de \
    --to=erik.rull@rdsoftware.de \
    --cc=eljay@adobe.com \
    --cc=gcc-help@gcc.gnu.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).