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]

Questions about GCJ


I am exploring using GCJ for embedded development using a target
platform based on Linux/Motorola 855 and 16-32 MB of total memory
(about 3 MB would be available for the Java application).

My first question is "is this reasonable?" If someone could give
me an indication of whether or not this is worth pursuing, I would
really appreciate it. If you've done something along those lines,
any useful info you can supply would be very much appreciated.
Also, how much memory will we need, both for the executable just
sitting on the flash memory card and for it to actually run?

I also have a few more technical questions: I find the binaries
generated with gcc3.2.3 are much smaller than with gcc3.3.3.

GCJ 3.3.3:
----------
%>gcj -O2 -c -o Hello.o com/Hello.java --classpath=.
%>gcj --main=com.Hello -o Hello -static -shared-libgcc -lstdc++ Hello.o
%>strip Hello
-rwxrwxr-x    1 levinv   levinv    2444380 Mar 25 15:28 Hello

GCJ 3.2.3:
----------
%>gcj -O2 -c -o Hello.o com/Hello.java --classpath=.
%>gcj --main=com.Hello -o Hello -static -shared-libgcc -lstdc++ Hello.o
%>strip Hello
-rwxrwxr-x    1 levinv   levinv    2055496 Mar 26 08:37 Hello

Any ideas why? Will binary size continue to increase? Obviously this
poses an issue for embedded development. Is there a way I can make
it smaller?

Finally, I have compiled a statically linked Hello World example
on Yellow Dog Linux running on a G4. When I move this executable over
to the Motorola 855 platform, it produces a Segmentation Fault. Any
help as to why would be greatly appreciated!

Vlad







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