This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: stripping libgcj.so.4 -- lightweighting libjava
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Erik Poupaert <erik dot poupaert at freestyler-toolkit dot org>
- Cc: Bryce McKinlay <bryce at mckinlay dot net dot nz>, <java at gcc dot gnu dot org>
- Date: Sun, 21 Sep 2003 13:04:34 -0400 (EDT)
- Subject: Re: stripping libgcj.so.4 -- lightweighting libjava
On Sun, 21 Sep 2003, 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