This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM support


I tried compiling HelloWorld with the -static flag. When I run it, I get
a segmentation fault and the filesize (after stripping is still around
2MB).

/* start HelloWorld.java */
public class HelloWorld {
	public static void main(String [] args) {
		System.out.println("Hello");
	}
}
/* end HelloWorld.java */

Compiled with :
gcj --main=HelloWorld -static -o HelloWorld HelloWorld.java

Gives thus a segmentation fault. It works without static linking.

Any ideas?

On Sun, 2003-06-29 at 00:32, Jeff Sturm wrote:
> On 28 Jun 2003, Geert Bevin wrote:
> > Is it possible to tune down the space requirements of GCJ? Currently a
> > stripped version of libgcj.so.3.0.0 takes about 8MB. That might be a bit
> > big for small embedded devices.
> 
> This comes up quite often.  Sadly, the Java runtime is bloated and heavily
> interdependent.  A simple "Hello, World" program tends to load/initialize
> hundreds of classes whether you use Sun's JRE or gcj.
> 
> Probably the best solution for embedded applications would be J2ME
> support in libgcj, whatever that entails.  I'm not aware of anyone working
> on it.
> 
> Right now you can use static linking, though it doesn't always work
> correctly (it will omit classes loaded by reflection).  The current lower
> bound on executable size seems to be around 1MB when linked with -static.
> 
> Jeff
-- 
Geert Bevin                       Uwyn
"Use what you need"               Rue Victor Cuvelier 57
http://www.uwyn.com               7190 Ecaussinnes
gbevin[remove] at uwyn dot com    Tel +32 67 78 04 06

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]