public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: travis@subspacefield.org
To: gcc-help@gcc.gnu.org
Subject: calling from one libfoo.a to another
Date: Wed, 10 Mar 2010 22:02:00 -0000	[thread overview]
Message-ID: <20100310220223.GC17496@subspacefield.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]

Hello all,

Not sure where to ask this, apologies in advance if this isn't
appropriate.  I'll only ask once, so ignoring me or a direct response
will be sufficient.

I'd like to call from one library (libfoo.a) to another (libbar.a) without
directly linking the two.  In other words, I'd like to have the symbol
resolved when I link the final executable.  I've tried "weak"
attribute, and they work in some cases, like when the caller is not in
a library, but on our platform, when you compile it into libraries, it
gets left undefined... a call to the weak reference will segfault at
run-time (I assume because it's not getting defined before the

I'm just curious if there's an easy way to call from one .a to another
to avoid drastically restructuring our code base.

If this is unclear, please let me know.
-- 
A Weapon of Mass Construction
My emails do not have attachments; it's a digital signature that your mail
program doesn't understand. | http://www.subspacefield.org/~travis/ 
If you are a spammer, please email john@subspacefield.org to get blacklisted.

[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2010-03-10 22:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 22:02 travis [this message]
2010-03-10 22:07 ` Brian Budge
2010-03-10 22:16   ` travis
2010-03-10 22:27     ` Brian Budge
2010-03-10 22:41   ` travis

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=20100310220223.GC17496@subspacefield.org \
    --to=travis@subspacefield.org \
    --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).