[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Link to static library from DSO without exporting symbols?

From: Paul Pluzhnikov
Subject: Re: Link to static library from DSO without exporting symbols?
Date: Fri, 29 Sep 2006 19:53:38 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

"Boris" <> writes:

>> [This topic has strayed too far from g++.
>> Perhaps you should take it to *advocacy* group.]
> Which group do you mean?

comp.os.linux.advocacy  - Benefits of Linux compared to other operating systems.

You can tell them how you think Linux 'ld' has the wrong behaviour,
and start a flame war there.

>> You know that you don't want these symbols to be exported, but the
>> linker can't "read your mind", and doesn't.
> I tried to explain that the linker can know as it simply needs to check 
> for --whole-archive being present or not.

I perfectly understand what you are trying to say, but you refuse
to understand what I am trying to explain: while the behaviour you
desire may appear "obvious and correct" to you, it is by no means
"obvious and correct" to me, nor to people who wrote 'ld'.

> If I don't use --whole-archive it 
> obviously means I only want code to be linked in *my* object files require. 

No, that is not at all obvious. It could well mean the exact opposite.

> If the code is only required by *my* object files why are the symbols then 
> exported?

Because *everything* is exported, unless you override that behaviour
with explicit version script.

In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]