This is the mail archive of the java-patches@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]

Re: Patch: java class registration via .jcr section


On Sun, Aug 05, 2001 at 06:35:49PM -0700, Anthony Green wrote:
> Tom wrote:
> > I think we'd prefer to use _Jv_RegisterClasses here.  For one thing
> > that saves one synchronization per class.  If this means changing
> > _Jv_RegisterClasses to accept an `int length' argument, that is fine
> > by me.
> 
> That won't work.  This function lives in crtend.o which only has access to
> __JCR_END__.  Everything fails in strange ways if I make __JCR_LIST__
> non-static and refer to it for a call to _Jv_RegisterClasses in crtend.o.

Yes it would, you're just approaching it the wrong way.  You'd count
the number of entries rather than getting it via pointer subtraction.

On relatively recent systems it is possible to use .hidden in order
to allow __JCR_LIST__ to be non-static yet not exported.  You may be
able to rely on HAVE_GAS_HIDDEN for this, but I am not sure.

Anyway, eliminating synchronizations is a Good Thing.


r~


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