dealing with non-self-contained jars?

Bryce McKinlay bmckinlay@gmail.com
Sun May 20 23:23:00 GMT 2007


On 5/21/07, Adam Megacz <adam@megacz.com> wrote:

> Apparently this works because people are accustomed to using this code
> in JVMs that do lazy linking, and the dangling references are in
> methods which don't get called.  Unfortunately, these become a problem
> when compiling with gcj -- it compiles the method bodies eagerly.
>
> Is there a trick to getting around this?  Perhaps some flag for gcj
> that says "if a method has compile-time-undefined references, just
> emit code to throw an instruction where the method body ought to be"?

Absolutely. See -findirect-dispatch

http://gcc.gnu.org/onlinedocs/gcj/Code-Generation.html#Code-Generation

Bryce



More information about the Java mailing list