This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: More questions about _GLOBAL



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]