Dynamic loading - solutions and more problems

Matt Welsh mdw@cs.berkeley.edu
Mon Apr 3 10:33:00 GMT 2000


Bryce McKinlay <bryce@albatross.co.nz> writes:
>> Yep! Go ahead and compile in all the dependencies. Of course, you'll need to
> compile in the dependencies' dependencies' as well, and so on. I think you
> will soon discover that the dynamic loading mechanism you want is quite
> unneccessary ;-)

Actually, you can get away with the following.
Say class A depends on B, which in turn depends on C. I can do;
gcj -shared -o C.so C.java
gcj -shared -o B.so B.java C.so
gcj -shared -o A.so A.java B.so
Linking C.so with B.java to produce B.so does not duplicate the code and
contents of C.so in B.so -- it just makes B.so refer to C.so. 
And, it looks like I don't need to be concerned with recursive dependencies,
since this example works if A.so is just linked with B.so (and not C.so).
So, I'm going to fix gcj -M and that should work for me.
Matt


More information about the Java mailing list

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