Re: libraryopt
On Tuesday 25 September 2007 11:52:00 pm Christian MICHON wrote: > I found back the script: it's still in the uClibc tarball. > > Have a look at libstrip: > > uClibc-0.9.29\extra\libstrip\ Thanks very much. The libstrip script is certainly a lot smaller than libraryopt. The use by libstrip of a generated linker script with "EXTERN" statements is a good solution, much better than what libraryopt does. This is a step forward. I worry about the following: -- The invocation of gcc is missing most of the arguments that are used when originally building libuClibc-0.9.28.so (presumeably 0.9.29 is similar), as determined by turning on verbosity in the build for my particular target (mips). I would guess that libstrip has not been kept up to date or was never correct. I of course would really like a solution that would "just work" when upgrading to a new version of uClibc and that would "just work" for any target, perhaps by using the same configuration information that is used for the original build of the libraries? -- The script is for libuClibc-0.9.5.so . Apart from the version problem, the script doesn't do anything for the other libraries. -- The libstrip script doesn't pull in any non-referenced yet "required" objects... from my experience so far, at least __uClibc_main.oS is required but doesn't contain any symbols referenced from executables... and possibly other objects are needed... in fact, this is one of my biggest questions (alternately a list of "required" symbols could do the job). Here is the invocation of gcc from libstrip: `gcc -s -nostdlib -Wl,-warn-common -shared \\ -o libuClibc-0.9.5.so \\ -Wl,-soname,libc.so.0 -Wl,--script=ldscript \\ $topdir/libc/libc.a \\ $topdir/libc/tmp/libgcc-need.a` And here is what i've found that i need for my target and libuClibc-0.9.8, to regenerate the library exactly as it was originally made (to produce an optimized version of the library of course requires changes): soname=libc.so.0 striparg=-s $archdir/bin/$archprefix'ld'\ -EB \ -shared \ --warn-common \ --warn-once \ -z combreloc\ -z relro\ -z now \ -init __uClibc_init \ -soname $soname \ $striparg \ -L $archdir/lib \ -o $dest.ref\ --whole-archive \ libc_so.a \ --no-whole-archive \ interp.os \ ld-uClibc.so.0 \ uclibc_nonshared.a \ libgcc.a Any further insight into these issues would be appreciated, and of course an entire fix would be nice... i'd like to help but can't really spare the time to come sufficiently up to speed with the uClibc way of doing things to propose such a fix. Thanks again -Ted Merrill emBuild Software Design ___ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc
Re: libraryopt
I found back the script: it's still in the uClibc tarball. Have a look at libstrip: uClibc-0.9.29\extra\libstrip\ -- Christian -- http://detaolb.sourceforge.net/, a linux distribution for Qemu with Git inside ! ___ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc
Re: libraryopt
On 9/26/07, emBuild Software Design <[EMAIL PROTECTED]> wrote: > I'd like to request as a feature addition to uclibc the addition of specific > support for libraryopt (http://libraryopt.sourceforge.net/), a tool that > reduces shared library size by removing unneeded object files from a rebuild > of the shared libraries... Erik Andersen used to have a script doing this. Please dig into the ml archives to find back explanations on how to do this. If I recall well, his script had a way to find which objects are required. You can do so manually using "nm" by the way. -- Christian -- http://detaolb.sourceforge.net/, a linux distribution for Qemu with Git inside ! ___ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc
libraryopt
I'd like to request as a feature addition to uclibc the addition of specific support for libraryopt (http://libraryopt.sourceforge.net/), a tool that reduces shared library size by removing unneeded object files from a rebuild of the shared libraries... for the system i'm working on i've been able to cut 250 KB off the uclibc shared library files (for mips) (although it isn't quite working yet once loaded on the target machine). To this end i'd be happy to send in libraryopt configuration files that i'm developing for uclibc and what documentation i have. Of course, i'm sure that the uclibc developers could do it much better than I, and i'm not entirely happy with what i have. There are a number of tricky points per each shared library: -- Finding the correct "entire" set of object files from the uclibc build... fortunately these seem to be in archive files like libc_so.a . -- Determining which of the object files are "required" even if there is no obvious dependencies on them from executables... this i'm worried about. -- Correctly rebuilding the shared object in the same way that uclibc generated the shared object, minus the unneeded objects of course. This might turn out to be somewhat target specific... ? By turning on verbosity in the uclibc build procedure i've been able to determine for my system the answers to the first and third of the above (i'm guessing at the second) except i haven't figure out how to rebuild libpthread .so file yet and there is still some issue with it actually working on the target yet. I verify that i'm rebuilding correctly by being able to generate a file identical to the original .so file when i include all of the object files. I'd also be happy (just not quite as ecstatic) if i could get some information on point 2 above (which object files are "required"). Thanks! Ted Merrill emBuild Software Design p.s. I had to fix one bug in libraryopt-1.0.1 , see http://sourceforge.net/tracker/index.php?func=detail&aid=1802332&group_id=33581&atid=408752 ___ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc