[uClibc]cvs commit to uClibc/extra/libstrip by ds
David Schleef
ds at schleef.org
Sat Dec 29 08:34:34 UTC 2001
On Sat, Dec 29, 2001 at 01:00:12AM -0700, ds at busybox.net wrote:
> Repository: uClibc/extra/libstrip
> who: ds
> time: Sat Dec 29 01:00:11 MST 2001
>
>
> Log Message:
>
> A little script to strip out unused portions of shared libs.
>
I've been trying to find an elegant way to do this for months,
in which elegant is liberally defined as a Perl script under 1000
lines. This script is about 30 of actual code, thus fits into
the normal definition of elegant.
Basically, you run 'libstrip busybox', and it will relink the
uClibc shared object file containing only the symbols necessary
to fully resolve busybox (or any other executable on the command
line.)
Results:
libuClibc.so, unlibstripped: 139864
libuClibc.so, libstripped for default busybox config: 99668
libuClibc.so, libstripped for test/*: 11668 [1]
By the way, 139864 is a result of using OPTIMIZATION = -Os
-mpreferred-stack-boundary=2 -malign-loops=0 -malign-jumps=0
-malign-functions=0. That seems to be the best in terms of
size.
dave...
[1] I'm sure this says something bad about the coverage of the
test programs.
More information about the uClibc
mailing list