From: Andreas Oberritter <obi@saftware.de>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: autofs@vger.kernel.org
Subject: Re: [PATCH v2] autofs-5.0.7 - create a shared library
Date: Fri, 15 Mar 2013 15:28:51 +0100 [thread overview]
Message-ID: <51433023.4060008@saftware.de> (raw)
In-Reply-To: <5143249F.1030808@msgid.tls.msk.ru>
On 15.03.2013 14:39, Michael Tokarev wrote:
> 15.03.2013 17:24, Andreas Oberritter wrote:
>> On 15.03.2013 11:28, Michael Tokarev wrote:
>>> 15.03.2013 02:30, Andreas Oberritter wrote:
>>>> This reduces the (stripped) binary size from 1.6M to 572K
>>>> on my system.
>>>
>>> But it creates an additional file, the shared library, which
>>> also occupes space.
>>>
>>> What's the reason for that? Instead of just one executable
>>> we now have executable plus a library, which together is
>>> larger than single executable.
>>
>> The numbers I mentioned are the total size of all created binaries (i.e.
>> excluding configuration und documentation, but including all modules and
>> the automount executable, and of course including the shared library).
>>
>> So why does this save space? Because the static library was linked into
>> every module and into the automount executable.
>
> Aha. So that's the library linked into every module. That explains
> things.
>
> But now I've another question. Maybe it is better to link whole that
> lib into the main executable, instead of linking it to every module?
I hope you don't mind me forwarding your response to the list.
This may work (using -Wl,--whole-archive), but I think this would
require some more testing.
A first compile-test shows that this would save further 36K on my
system, compared to the shared library.
Regards,
Andreas
next prev parent reply other threads:[~2013-03-15 14:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 15:20 [PATCH 1/3] autofs-5.0.7 - include linux/nfs.h directly in rpc_subs.h Andreas Oberritter
2013-03-14 15:20 ` [PATCH 2/3] autofs-5.0.7 - pass -pthread flag to gcc Andreas Oberritter
2013-03-14 15:21 ` [PATCH 3/3] autofs-5.0.7 - create a shared library Andreas Oberritter
2013-03-14 22:30 ` [PATCH v2] " Andreas Oberritter
2013-03-15 10:28 ` Michael Tokarev
2013-03-15 13:45 ` Andreas Oberritter
[not found] ` <51432119.2010200@saftware.de>
[not found] ` <5143249F.1030808@msgid.tls.msk.ru>
2013-03-15 14:28 ` Andreas Oberritter [this message]
2013-03-15 15:46 ` [PATCH] autofs-5.0.7 - link autofs.a into executable only Andreas Oberritter
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=51433023.4060008@saftware.de \
--to=obi@saftware.de \
--cc=autofs@vger.kernel.org \
--cc=mjt@tls.msk.ru \
/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