Shrinking/stripping libgcj for superfluous "classes"
Andrew Haley
aph@redhat.com
Mon May 17 10:15:00 GMT 2004
Martin Egholm Nielsen writes:
> > Martin> In case I don't want to have my embedded application static
> > Martin> linked, is there a way to strip the libgcj for "classes" I
> > Martin> certainly do not use - e.g. "java.awt.*", "javax.swing.*",
> > Martin> etc.?
> > Tom> Right now, edit the Makefile and rebuild. Look back through the
> > Tom> list archives, this topic has come up a few times recently.
> Ok, that's a possibility :o)
> I was hoping it might be possible using a tool similar to "strip" that
> worked directly on the libgcj.so-file?!
That's hard, because in most cases there is no direct reference to a
method. Instead, each instance of Class has a pointer to its vtable,
and clients refer to methods by a vtable offset.
Andrew.
More information about the Java
mailing list