gcj-compiled HelloWorld.exe size

Tom Tromey tromey@redhat.com
Fri Jan 17 01:55:00 GMT 2003


>>>>> "Boris" == Boris Kolar <boris.kolar@globera.com> writes:

Boris> I guess I could live without 90% of String's functions, so I
Boris> can do a hack here. I could also live without most Class's
Boris> functions, especially "forName" and reflection support.
This topic has been extensively discussed on the list several times.
The summary is that there are things we could do in the future, but
not much right now.
If you want to go to some extreme of minimalism, you could always hack
the sources to remove what you don't want. That's going to be a lot
of work though.
Boris> Hmm, I just got another idea: how about if I compile libgcj
Boris> native parts only and let compiler build my project with my own
Boris> versions of Object, Class, String, ... classes. Do you think
Boris> that would work?
For at least Object and Class (and String? I forget) it will be
difficult. The compiler knows about the layout of these classes, and
tends to crash if you modify them in a way it doesn't like (a
longstanding but very low priority bug).
Still, it is of course possible. You might have to modify the
compiler too.
I think in the long term we'd prefer to go in a direction Adam
suggests; namely somehow using linker section gc to create minimal
executables. As Andrew points out, something like this will always be
expert territory, since you'll need to know things about the runtime's
internals to make certain features work properly. For instance, if
you use Security you'll need to know to explicitly link in the
security provider. There are probably ten things like this.
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /