This is the mail archive of the
gcc@gcc.gnu.org
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 <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