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.