Why is _Jv_RegisterClasses in libstdc++.so?
Tom Tromey
tromey@redhat.com
Mon Jun 3 08:01:00 GMT 2002
>>>>> "Phil" == Phil Edwards <phil@jaj.com> writes:
Phil> Looking over the results of a 3.1 build, and noticed this symbol
Phil> in libstdc++.so. Should the C++ library contain references to
Phil> Java? Even when this particular build didn't have Java enabled?
Phil> Why?
I think every gcc-compiled program will have a reference to this. It
is declared weak and called at startup if it is defined. See this
patch and associated commentary:
2001-08-08 Anthony Green <green@redhat.com>
* java/class.c (emit_register_classes): Use assemble_jcr if
possible. Keep the original mechanism as a fallback.
* defaults.h (JCR_SECTION_NAME): Define if we have named section
and weak symbol support.
* crtstuff.c (__JCR_LIST__): Define.
(__JCR_END__): Define.
(_Jv_RegiserClasses): Define weak symbol if possible.
(__do_global_ctors_aux): Register classes for ELF targets with
weak symbol support.
Tom
More information about the Gcc
mailing list