change of libgcj soname for gcc-3.2?

Jeff Sturm jsturm@one-point.com
Mon Jul 29 20:24:00 GMT 2002


On 29 Jul 2002, Adam Megacz wrote:
> This was a source of much frustration for me early on.

Ditto here...
> I take it that at compile time, virtual method invocations generate a
> CALL(symbol_for_vtable + N * sizeof(void*)) where N is the numerical
> index of the member function being invoked.

In order of declaration, yes. Unfortunately that means two classes can be
identical (as far as Java is concerned) but order their methods
differently, causing all sorts of breakage.
> Does the indirect dispatch stuff solve this problem?

Yes, that's what -findirect-dispatch does. It binds method calls to their
vtable slots at runtime. It doesn't do anything with field offsets yet,
but that's less important because public instance fields aren't all that
common.
At the moment the bytecode interpreter is broken with -findirect-dispatch.
I'm testing a patch.
> Actually, I wonder if it's feasible to delay writing CALL addresses
> until class initialization time. Are code pages write-protected in
> memory, or could ClassLoader::loadClass() do something similar to what
> ldd does (ie runtime fixups)?

PIC code isn't supposed to have runtime fixups. On some platforms it may
be possible to unprotect text pages and get copy-on-write behavior though.
Jeff


More information about the Java mailing list

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