More questions about _GLOBAL

Adam Megacz gcj@lists.megacz.com
Wed Jan 30 16:00:00 GMT 2002


Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:
> >Ugh, so _Jv_RegisterClass calls class initializers (<clinit>'s)?

> No. Think of _Jv_RegisterClass(es) as the bootstrapping mechanism which 
> tells the Java runtime that the class exists.

Yeah, that's what I thought. I guess I misread a previous
post. <clinits> are executed (if needed) at the beginning of
constructors and static methods, IIRC.

> Another solution would be to change _Jv_RegisterClass() to ignore a
> NULL argument, but I'd be hesitant to do that since it could hide
> bugs.

Yeah, and it won't work anyways since you aren't guaranteed to get a
NULL when a file-local relocation fails to resolve (win32 randomly
chooses another symbol to use instead -- aargh! I think the ELF linker
does the sane thing and writes a NULL.)

  - a



More information about the Java mailing list