7 Jan 17:07
Re: Executable size problem
From: Andrea aime <andrea.aime <at> aliceposta.it>
Subject: Re: Executable size problem
Newsgroups: gmane.comp.gcc.java.devel
Date: 2006-01-07 16:07:17 GMT
Subject: Re: Executable size problem
Newsgroups: gmane.comp.gcc.java.devel
Date: 2006-01-07 16:07:17 GMT
Andrew Haley wrote: > Andrea aime writes: > > > > I'm wondering, why every class of the standard runtime has to > > be compiled into the simple hello world style app? > I have done a few tests and managed to get the executable size down quite a bit. Instead of linking all the libraries with all their contents, I used ProGuard (a shrinker/obfuscator) to preprocess org.eclipse.* jars in order to keep only the classes needed by the application, and then compiled again with gcj. Surprise surprise, the executable is now "only" 18MB instead of 30MB, and it works, too: the linker did not shave off many uneeded org.eclipse.* classes when I linked the original jars. (if you want the proguard configuration file, I can send it to you). I'm wondering if I can shrink it further by letting ProGuard process the gjc runtime libraries... is it possible to get the runtime library as a jar file and make the linker avoid linking libgcj.a? Just curious. Best regards Andrea Aime
RSS Feed