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: I can make your gcj-compiled binaries much smaller.


Hi,

On Tue, 2003-01-14 at 22:38, Tom Tromey wrote:
> >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
> 
> Andrew> However, I don't think we should get into the situation where libgcj
> Andrew> contains static class references "in order to make static linkage
> Andrew> work."  This is, to say the very least, bad software engineering
> Andrew> practice and might well lead to all kinds of support headaches.
> 
> We already do a little of this.  See FirstThread.java.
> 
> Right now I think we only do this for classes required by the startup
> code.  The problem with us doing it in general is that it eliminates
> an advantage of static linking, namely removing classes you really
> don't want.

We also do it in case of the GNU security provider see
gnu/java/security/provider/Gnu.java where we have for each algorithm.

  put("MessageDigest.MD5",
      gnu.java.security.provider.MD5.class.getName());

Note that when I did that it fixed a couple of typos in the original
Strings. This kind of construct catches class name typos at compile
time. But it was also partly done to make ObjectStreamClass (suid
calculation) work when compiling with -static.

Cheers,

Mark


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