This is the mail archive of the
mailing list for the GCC project.
Re: Why is _Jv_RegisterClasses in libstdc++.so?
- From: Tom Tromey <tromey at redhat dot com>
- To: Phil Edwards <phil at jaj dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 03 Jun 2002 09:14:10 -0600
- Subject: Re: Why is _Jv_RegisterClasses in libstdc++.so?
- References: <20020603100300.A11091@disaster.basement.lan>
- Reply-to: tromey at redhat dot com
>>>>> "Phil" == Phil Edwards <email@example.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?
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 <firstname.lastname@example.org>
* 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.
(_Jv_RegiserClasses): Define weak symbol if possible.
(__do_global_ctors_aux): Register classes for ELF targets with
weak symbol support.