This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [BC] Link libs with -Bsymbolic
Andrew Pinski writes:
>
> On Nov 15, 2004, at 9:20 AM, Andrew Haley wrote:
>
> > If you have multiple versions of the same class loaded in separate
> > shared objects, Bad Things happen with symbol resolution due to shared
> > library loader rules.
> >
> > -Bsymbolic causes the linker to resolve as many symbols as possible at
> > link time, so references from a class to its indirection table (for
> > example) are not resolved to a separate shared object. This has the
> > additional advantage of making loading faster.
> >
> > We can't make all these symbols private because CNI programs need
> > access to them, at least for the time being.
> >
> >
> > However, some issues:
> >
> > Is this possible on non-GNU operating systems?
> > Should we always use -Bsymbolic when making a shared lib?
> >
> > If the answer to ii. is "yes", we can probe for -Bsymbolic with
> > autoconf and put it into libgcj.spec when linking: we won't need it
> > explicitly in Makefile.am.
>
> And the answer to part i on darwin is would be -single_module.
Thank you. I suppose the easiest way to do this would be to add the
appropriate flags to configure.host.
Andrew.