This is the mail archive of the
mailing list for the Java project.
Re: Dynamic loading - solutions and more problems
- To: Matt Welsh <mdw at cs dot berkeley dot edu>
- Subject: Re: Dynamic loading - solutions and more problems
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Mon, 03 Apr 2000 17:31:33 +1200
- CC: java-discuss at sourceware dot cygnus dot com
- References: <200004030423.VAA10638@mnemosyne.CS.Berkeley.EDU>
Matt Welsh wrote:
> Right. The problem here is that then somehow I need to know a priori
> that ToLoadIF is required by MainProgram.so. Is there some automatic way
> of making that determination?
Yes: gcj -M MainProgram.java
> it would be great if gij could really use precompiled .so files
> in place of .class files, without having the programmer to do anything
That would be way cool (at least in theory), because I don't like the idea (both
from a file-size and complexity pov) of having to distribute complete .class
files along with every precompiled .so library. I don't think there is any
fundamental reason why it couldnt be done, assuming everything you need to
compile is available via reflection data, but I would imaging it will be a lot of
work to change the compiler to do this.
However, my gut feeling is that creating hundreds of .so files (one for every
class or so) and loading each one dynamically is a bad idea. You're adding back a
LOT of overhead (resolving, loading individual classes) that was avoided by
native compilation in the first place. If this is what you want to do, I think
you'd be better off using .class files and a good JIT.
> My users are frustrated by having to write complex makefiles to
> use gcj ...
I agree that makefile complexity is a serious issue. However, I personally don't
like the idea of *ever* having to write a Makefile - its not just a gcj thing.
Writing a makefile for a gcj program is no more complex than writing one for a C
program. I think yours is the wrong solution for this problem.
> It looks like the -fno-assume-compiled
> mechanism is seriously broken if I can't use it for *anything*.
I'm guessing it has suffered bit-rot because nobody uses it. It isn't even clear
to me (exactly) what it is supposed to do.
[ bryce ]