More questions about _GLOBAL

Adam Megacz gcj@lists.megacz.com
Tue Jan 29 14:24:00 GMT 2002


Per Bothner <per@bothner.com> writes:
> > The optimization I'm trying to do is this: if none of a class's
> > constructors are reachable, I prune foo.bar.baz.class$ from the
> > output. Unfortunately, the __GLOBAL_foo.bar.baz symbol will call
> > _Jv_RegisterClass(foo.bar.baz.class$), which then SEGV's.

> I think this is easiest handled at compile time, rather than
> link time.  We could add a flag
>    --forname-findable=CLASSX,CLASSY,...
> This tells the compiler to suppress the _Jv_RegisterClass call for
> a class, unless it is one of the ones listed.

Yeah, unfortunately I'm running this on stuff within libgcj.a -- so
people would have to recompile libgcj every time the set of stuff they
need changes. That's also why I can't rely on compiler changes to do
my work -- I have to do everything in the post-compile, pre-link
stage.

  - a



More information about the Java mailing list