tech-userlevel archive

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

Re: Trivial program size inflation



On Sun, Jul 02, 2023 at 12:34:25PM +0200, tlaronde%polynum.com@localhost wrote:
> It is curious that you react this way in a thread where, you as others,
> have had your jaw drop seeing the size of a literally do_nothing
> executable. This was unseen precisely because few use static linking.

I'm not sure that is what we see here.

As Jason said: we have one platform (sun2) where only static linking is
available, and we do notice huge size explosions, e.g. when install
media does not fit any more. This platform is part of the daily builds.

Note that a "do nothing" binary is a useless tech demo. If you really
want it, you could avoid libc and csu, and be down to a few bytes.

The "jemalloc is big" details may be the only suprising thing here, but
some did know that and we provide a special build option to use an older
(and much smaller) version instead.

Way more interesting than useless tech demo sizes would size inflation
of a real world minimal program, when linked statically.

The other things that we *might* look into (if someone volunteers) is to
better modularize the CSU code, but it is not immediately clear how
that could/should be done.

However, I personally disagree with Jason on the static linking support
and would prefer to keep it. I find it usefull every now and then in
special situations, and I really like that I can test boot NetBSD
kernels w/o swapping libc to a matching version.
It does not come for free though.

Martin


Home | Main Index | Thread Index | Old Index