libgcj_bc.so not embedded

Mohsen Saboorian mohsens@gmail.com
Sun Apr 8 21:27:00 GMT 2007


Thanks,
It now compiles correctly. The application starts, but gives NCDFE.
The problem is now the code loaded via reflection, which causes
problems with -static-gcj option (which someone mentioned earlier). I
load XML with Java 1.4 API. DOM implementation for GCJ is
gnu.xml.dom.*, which is not embedde in the final executable file. Is
is possible to statically link some other library for this mean? If
yes which library and how?

If there is no direct solution for that, I think I should bundle
Xerces with my code. The size is gradually increasing. It might better
to install a gij runtime for OLPC then :)

Thanks.

On 4/8/07, Andrew Haley <aph@redhat.com> wrote:
> David Daney writes:
>  > Mohsen Saboorian wrote:
>  > > I have compiled all jar dependencies into .o files using
>  > > -findirect-dispatch option. My last command line to make all-in-one
>  > > executable file looks like this:
>  > > $ gcj-4.1 -omyApp.executable -static-libgcj -O3 --main=my.main.Class
>  > > -findirect-dispatch -fjni jar1.o jar2.o jar3.o
>  > >
>  >
>  > -static-libgcj has never been tested with -findirect-dispatch or -fjni.
>  > If you are statically linking there should be no need for
>  > -findirect-dispatch as you will never be upgrading the runtime (or
>  > anything else for that matter).
>
> That's right.  With -findirect-dispatch and -static-libgcj the linker
> won't have a clue what it's supposed to be linking.
>
> Andrew.
>
> --
> Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
> Registered in England and Wales No. 3798903
>



More information about the Java mailing list