[BC] Link libs with -Bsymbolic

Andrew Haley aph@redhat.com
Tue Nov 16 16:50:00 GMT 2004


Andrew Haley writes:
 > Tom Tromey writes:
 >  > >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
 >  > 
 >  > Andrew> I wonder if we will ever need to turn -Bsymbolic off?  I
 >  > Andrew> haven't used it when linking libgcj.so itself: it may not be
 >  > Andrew> absolutely necessary, and I'm being cautious.
 >  > 
 >  > I think we need to consider the use cases we want to support.
 >  > 
 >  > E.g., if we want to support replacing a single class from one of the
 >  > .so files, then we need to compile the objects in that .so with
 >  > -findirect-dispatch (and then I suppose -Bsymbolic becomes
 >  > irrelevant).
 > 
 > That's not true.  Any class compiled with -findirect-dispatch MUST
 > also be compiled with -Bsymbolic because otherwise internal symbols

be linked, I mean.

 > within a class will be resolved externally.  This is never correct.

We need at least to document this, but it's a real minefield.

Andrew.



More information about the Java-patches mailing list