This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Reducing static binary sizes
- From: Anthony Green <green at redhat dot com>
- To: Andrea aime <andrea dot aime at aliceposta dot it>
- Cc: java at gcc dot gnu dot org, brian at alliet dot com
- Date: Sun, 08 Jan 2006 04:24:10 -0800
- Subject: Re: Reducing static binary sizes
- References: <43BFF7E6.6060806@aliceposta.it> <x1mzi7cxne.fsf@nowhere.com> <43C0D0D6.606@aliceposta.it>
On Sun, 2006-01-08 at 09:44 +0100, Andrea aime wrote:
> Cool, thank you Adam, I'll try it and report back where I got with
> executable size reduction. In the meantime, can someone more
> knowledgeable tell the poor java programmer if it's possible to link
> a different version of the runtime library (a stripped one, for example)
> instead of the standard libgjc? I've tried to read the gcj online
> manual, but didn't have much luck...
If I understand your question, then yes. Just link normally with gcj
-v. The -v option tells the compiler to be verbose about what it's
doing. Look at the list of objects files and libraries that it uses in
the link. Then link again, this time with gcj -nostdlib and use that
entire list of object files and libraries, simply replacing -lgcj with
your own version.
AG