This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why is _Jv_RegisterClasses in libstdc++.so?


>>>>> "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


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