stripping libgcj.so.4 -- lightweighting libjava
Jeff Sturm
jsturm@one-point.com
Sun Sep 21 17:21:00 GMT 2003
On 2003年9月21日, Erik Poupaert wrote:
> By removing excess fat outside the core, and stripping the resulting libgcj.so, what
> footprint and performance gains can be achieved already?
>> I am currently trying to do the excercise with brute force (taking out stuff the
> silly way). I feel that a functional libgcj.so should be possible in less than 2 MB
> (instead of a staggering 40 MB)?
I think others have tried this already with mixed results. You're free of
course to do what you like with your own libgcj installation, within the
license terms.
In practice it's difficult to separate much at this time due to the way
the core libraries are interconnected. And most of these core libraries
are required to use Java applications.
We don't do all that badly now, I once built a Jacl interpreter that ran
on a SH-4 in about a 3MB footprint. That was with GCC 3.3 IIRC, and
static linking. The shared libgcj.so adds a lot of bloat for several
reasons.
If you can be patient, there will be answers. The binary compatibility
work is already underway, thanks to the efforts of Andrew, Bryce and
others, and I know it is blocking some good techniques to reduce the
footprint of gcj-compiled applications.
Jeff
More information about the Java
mailing list