public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Feuerbacher, Alan" <AFeuerbacher@ALLEGROMICRO.com>
To: Ian Lance Taylor <iant@google.com>, Dan Hitt <dan.hitt@gmail.com>
Cc: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: RE: is there any way to change the order of name resolution in linking (aside from putting the libraries in the right order?)
Date: Thu, 27 Sep 2012 14:05:00 -0000	[thread overview]
Message-ID: <680BABF85B31BC4DB6E3E4E33D569F4D0AC12D1B@NHEXCH2.allegro.msad> (raw)
In-Reply-To: <CAKOQZ8y50rM=ZcjLm9sCZBAAdj7+s=cPqerbJHpCngztje4Siw@mail.gmail.com>

Ian Lance Taylor wrote:


> One thing that may work, if you are using the GNU linker or something
> reasonably compatible, is
>     -Wl,--whole-archive,-lMYLIB,-Wl,--no-whole-archive
> 
> That will link in the entire contents of the library, so all the
> symbols defined in the library will be available.

I'm trying something like that for a related purpose, but for it to work you have to replace the "," after "MYLIB" with a space. Otherwise gcc complains about an invalid option "-Wl".

Alan

  reply	other threads:[~2012-09-27 14:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27  5:09 Dan Hitt
2012-09-27  5:24 ` Ian Lance Taylor
2012-09-27 14:05   ` Feuerbacher, Alan [this message]
2012-09-27 16:06     ` Jonathan Wakely
2012-09-27 17:56     ` Ian Lance Taylor
2012-09-27 20:05       ` Dan Hitt
2012-09-27 20:08         ` Jonathan Wakely
2012-09-27 20:16           ` Dan Hitt
2012-09-28 13:13             ` Vardhan, Sundara (GE Transportation)
2012-09-30  1:06               ` Dan Hitt
2012-09-30 10:00                 ` Jonathan Wakely
2012-10-01  4:14                   ` Dan Hitt

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=680BABF85B31BC4DB6E3E4E33D569F4D0AC12D1B@NHEXCH2.allegro.msad \
    --to=afeuerbacher@allegromicro.com \
    --cc=dan.hitt@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=iant@google.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).