netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Laurent Bercot <ska-devel@skarnet.org>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH libnftnl] src: restore static array with expression operations
Date: Mon, 23 Mar 2015 14:50:11 +0000	[thread overview]
Message-ID: <20150323145011.GC603@acer.localdomain> (raw)
In-Reply-To: <551020D6.2080502@skarnet.org>

On 23.03, Laurent Bercot wrote:
> On 23/03/2015 14:54, Patrick McHardy wrote:
> >What does work is using
> >
> >-Wl,--whole-archive libnftnl.a -Wl,--no-whole-archive
> >
> >Not sure if we want to take this path, but it seems acceptable to
> >me.
> 
>  I'm sorry, but that is not acceptable to me : it defeats
> the purpose of static archives, and forces nft, and every
> subsequent program using libnftnl, to include in its binary
> every possible optional feature you may want to add to libnftnl.
> 
>  As a low-level networking utility, nft has its place on
> embedded devices (which is my current case). The statically
> linked binary for x86_64 (with musl) is already more than 600 kB,
> stripped: that is huge. It's more than my whole busybox binary.
> And that is with XML and JSON support entirely disabled.

I would be surprised if the alternative provides a much smaller
binary. Basically everything is referenced through the registered
structures and functions called from there. I don't think it
makes any difference.

>  Risking further growth in an uncontrollable way just to use a
> gcc-specific feature - which also prevents compiling it with
> clang/llvm - doesn't sound like the right solution.
> 
>  As a user, Pablo's patch looks like a good fix to me.

Well, we would like to keep the callbacks. We can continue to
look for a different solution. But either way you will have
tons of potentially unused functions in there since the library
resolves a lot of things at runtime.

  reply	other threads:[~2015-03-23 14:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 11:44 [PATCH libnftnl] src: restore static array with expression operations Pablo Neira Ayuso
2015-03-23 11:44 ` Patrick McHardy
2015-03-23 12:34   ` Pablo Neira Ayuso
2015-03-23 13:08     ` Patrick McHardy
2015-03-23 13:21       ` Laurent Bercot
2015-03-23 13:33         ` Patrick McHardy
2015-03-23 13:37           ` Laurent Bercot
2015-03-23 13:54             ` Patrick McHardy
2015-03-23 14:19               ` Laurent Bercot
2015-03-23 14:50                 ` Patrick McHardy [this message]
2015-03-23 14:58                   ` Laurent Bercot

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=20150323145011.GC603@acer.localdomain \
    --to=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=ska-devel@skarnet.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 NNTP newsgroup(s).