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: PATCH: Build shared libraries with -Bsymbolic-functions


On Fri, Jan 12, 2007 at 08:57:42AM +0100, Paolo Bonzini wrote:
> 
> >libjava will use -Bsymbolic on Linux, which is more aggresive than
> >-Bsymbol-functions. It will bind global data references locally in
> >additon to global function references. My patch will keep -Bsymbolic
> >for libjava if it is set by libjava/configure.host.
> >
> >Here is an updated patch.
> 
> The configury logic is fine by me, but please wait for approval at least 
> from the libjava and libstdc++ maintainers since I don't understand 
> fully the consequences of the -Bsymbolic stuff.  Could it be considered 
> an ABI change, in that programs previously overriding some symbols will 
> break?  (Sorry if the question is dumb).

My change should allow programs to override functions which are
overridable as specified in language standards. That is why I build
libstdc++.so with --dynamic-list-cpp-new so that programs can override
C++ operator new/delete.  Programs depending on overriding function
symbols, which aren't overridable in language standards, are broken.
In theory, you can have a huge .o file containing all library
functions which aren't overridable in language standard.  You
won't be able to override any of those functions when that .o file
is linked in statically.

Since I used -Bsymbolic-functions, it has no effect on data symbols.


H.J.


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