[Top][All Lists]

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

Re: LDADD and linker options like --whole-archive

From: Stefan Puiu
Subject: Re: LDADD and linker options like --whole-archive
Date: Thu, 20 Apr 2006 10:54:14 +0300

Hi Marc,

what can I say, on one hand you've made me curious about this option.
We're also experiencing long linking times (well, nothing compared to
the old project you mentioned), but still, 4 minutes for linking in
one modified library is a bit much.

Unfortunately, we're not using libtool yet. Our libraries are all
static, built with noinst_LIBRARIES=libsomelib.a etc.

After reading most of the emails in the discussion, I'm wondering
about the documented need to run 'ld -Ur' with C++ programs, and do
that only once. You said somewhere that the software you develop is
using CORBA, and that you don't need to call constructors through
CORBA (but I guess you do use constructors in other code) - I'm not
sure if this would work for us.

Also, I'm having a bit of trouble understanding how these relocatable
objects work - so, when you link those in the final binary, is it that
*all* the code is linked? Because right now we have both libraries
that have to be included as a whole, since they have code which is not
explicitly referenced, but they are used anyway, and libraries that we
only want to get useful stuff from, not everything. I recently changed
our build to separate these, because before somebody had just put
everything under --whole-archive, and I managed to shrink the biggest
binary by 10MB. Or do you suggest that I would only make the
--whole-archive libraries into relocatables?


On 4/19/06, Marc Alff <address@hidden> wrote:
> Hi Stefan
> A possible way to force code to be presented to the linker is to use
> partial linking ("relocatables"), instead of regular libraries,
> so that unreferenced symbols are preserved along the way,
> and order does not matter (since internal links are resolved).
> Please look at the following threads, as the proposal described there
> might be of interest to you.
> Automake _RELOCATABLE enhancement :
> Libtool patch (bug fixes) :
> Automake patch (enhancement) :
> If that seems like a possible solution, please let me know :
> it might convince me to actually finish the automake patch (for shared
> objects)
> and write the documentation :-)
> Cheers,
> Marc Alff.

reply via email to

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