This is the mail archive of the
mailing list for the GCC project.
Re: gcj, shared libraries, and -Bsymbolic
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 25 Jan 2005 09:54:24 -0500
- Subject: Re: gcj, shared libraries, and -Bsymbolic
- References: <firstname.lastname@example.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jan 25, 2005 at 02:43:55PM +0000, Andrew Haley wrote:
> The C semantics of the dynamic linker don't play well with Java: when
> a method in a shared library accesses some locally defined object it
> wants the local copy, not some other object with the same name that
> happens to be in a shared library earlier in the search path.
> However, the semantics we require correspond quite nicely with the the
> GNU linker option -Bsymbolic.
On the other side, -Bsymbolic doesn't work at all together with C++
semantics. So if you link both Java and C++ code into a shared library
and link with -Bsymbolic, C++ code will often misbehave.