From: Dan Hitt <dan.hitt@gmail.com>
To: "Vardhan, Sundara (GE Transportation)" <sundara.vardhan@ge.com>
Cc: Jonathan Wakely <jwakely.gcc@gmail.com>, 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: Sun, 30 Sep 2012 01:06:00 -0000 [thread overview]
Message-ID: <CAOphizKsEFHEvXGAS6uiFGFi_8d770neFb2E6f=V-_7sj=8mKQ@mail.gmail.com> (raw)
In-Reply-To: <1E5FA3D775D47342864BD139C7582A5503BF3649@ALPMLVEM05.e2k.ad.ge.com>
Thanks Sundara.
Actually, i tried several variations to try to specify the extension.
These are the variations i tried, with the results:
-lX11 (found, but does not resolve symbols)
-lX11a (cannot find)
-lX11.a (cannot find)
lX11 (cannot find)
libX11 (cannot find)
libX11a (cannot find)
libX11.a (cannot find)
llibX11.a (cannot find)
-llibX11.a (cannot find)
Just for reference, these go in the arguments as
-Wl,--whole-archive,<<library goes here>>,--no-whole-archive
and so far, the only things that don't bail are -lX11 and
/usr/lib/...../libX11.a,
and the latter is the only thing that actually resolves any symbols.
dan
On Fri, Sep 28, 2012 at 6:13 AM, Vardhan, Sundara (GE Transportation)
<sundara.vardhan@ge.com> wrote:
> Hi Dan
>
> I think -l defaults to .so and does not include .a if the extension is
> not explicitly mentioned. However, I am not sure if anything in this
> area changed in the latest gcc.
>
> Regards
>
> Vardhan
>
> -----Original Message-----
> From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
> Behalf Of Dan Hitt
> Sent: Thursday, September 27, 2012 4:17 PM
> To: Jonathan Wakely
> Cc: 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?)
>
> On Thu, Sep 27, 2012 at 1:08 PM, Jonathan Wakely <jwakely.gcc@gmail.com>
> wrote:
>> On 27 September 2012 21:04, Dan Hitt wrote:
>>>
>>> I was not able to use the -l abbreviation
>>
>> Why not?
>
> It didn't resolve the reference.
>
> To be really specific here (except that i have to suppress some of the
> dozens of characters in the command), the command generated was:
>
> gcc-4.6 -Wl,--whole-archive,-lX11,--no-whole-archive [[[other stuff
> deleted]]]
>
> And that command gives the same result as just putting -lX11 first (as
> opposed to putting it last, which resolves everything).
>
> (It may be that the -l option somehow signifies *.so these days?
> Because it certainly gives a much smaller executable when it works, and
> i had to use the *.a forms with --whole-archive in order to make it
> work?)
>
> dan
next prev parent reply other threads:[~2012-09-30 1:06 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
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 [this message]
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='CAOphizKsEFHEvXGAS6uiFGFi_8d770neFb2E6f=V-_7sj=8mKQ@mail.gmail.com' \
--to=dan.hitt@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=jwakely.gcc@gmail.com \
--cc=sundara.vardhan@ge.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).