2007/4/7, Robert Dewar <[EMAIL PROTECTED]>:
> > A solution is using the -shared option to generate ".so" library.
>
> That does not solve things in environments like embedded
> environments where there are no shared libraries.

Use -Os and "strip --strip-all". And remove code if you don't like it.

> > Another future solution is pack the big ".so" library with UPX
> > (Ultimate Packer for eXecutables) or extend the ELF format to
> > permit pack the sections with GZ, BZ2 or LZMA.
>
> We are worried about code space in memory, not space on disk!

Or extend the ELF format to permit pack non-solidly the many
subsections with GZ, BZ2, UPX or LZMA (<=1MiB to uncompress e.g.).
Theirs buffers are very small
to permit to raise an exception.
Like squashfs for embedded systems instead cramfs.


This same idea is applicable to pack the gigant /usr/lib/libgcj.so that
its  current non-packed size on disk is >=9 MiB, sometimes >=50 MiB.

Remember, Java is generated to C++ with gcj and compiled with g++.

Reply via email to