public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dan Hitt <dan.hitt@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: 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 05:09:00 -0000	[thread overview]
Message-ID: <CAOphiz+Cvfa-=zw63VEY1t+fUBHyoe_s+nc_VJTRdBYEXHEf=w@mail.gmail.com> (raw)

I am building some code and i need a certain library to be linked in
last, so it can resolve symbols left unresolved earlier.

Normally the way to do this would be to just list that library last
on the command line.

However, i'm using a build system which constructs all the
commands for me, and although it makes a provision for
adding extra arguments to the linker, they end up going first.

So although i can add arguments to the link, i cannot order
them the way i want, and i get unresolved symbols as a consequence.

So i'm wondering if there's any argument i can slip in that will change
the order that gcc runs through the libraries in.

(The gcc info suggest not, but perhaps there's an undocumented
option for doing this?)

Thanks in advance for any clues on this.

dan

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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27  5:09 Dan Hitt [this message]
2012-09-27  5:24 ` Ian Lance Taylor
2012-09-27 14:05   ` Feuerbacher, Alan
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='CAOphiz+Cvfa-=zw63VEY1t+fUBHyoe_s+nc_VJTRdBYEXHEf=w@mail.gmail.com' \
    --to=dan.hitt@gmail.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).