This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Build shared libraries with -Bsymbolic-functions
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: hjl at lucon dot org (H. J. Lu)
- Cc: pinskia at physics dot uc dot edu (Andrew Pinski), aph at redhat dot com (Andrew Haley), paolo dot bonzini at lu dot unisi dot ch (Paolo Bonzini), gcc-patches at gcc dot gnu dot org
- Date: Wed, 31 Jan 2007 17:21:11 -0500 (EST)
- Subject: Re: PATCH: Build shared libraries with -Bsymbolic-functions
>
> On Sun, Jan 14, 2007 at 10:47:41AM -0800, H. J. Lu wrote:
> > On Sun, Jan 14, 2007 at 01:30:07PM -0500, Andrew Pinski wrote:
> > > > I checked in the libjava part. Here is the updated patch for other
> > > > libraries. If someone can give me a list of functions in libobjc
> > > > which should be overridable, I will add them to the dynamic list
> > > > for libobjc.
> > >
> > > All except for the class functions themselves. For libobjc, a better
> > > way of doing this is actually marking the class methods as hidden as they
> > > are never called directly.
> >
> > I assume *.m files have class functions and other files have non-class
> > functions which may be overrable by programmers. Is that correct?
> >
> > What about functuons with the prefixes of __?
>
> I took a look at
>
> http://www.dribin.org/dave/blog/archives/2006/04/22/tracing_objc/
> http://developer.apple.com/documentation/DeveloperTools/Conceptual/DynamicLibraries/Articles/UsingDynamicLibraries.html#//apple_ref/doc/uid/TP40002182-DontLinkElementID_32
Apple's documention is about the NeXT runtime and not the GNU runtime so those don't
apply really. The first link also only applies to the NeXT runtime.
I have a patch for libobjc to use -fvisibility=hidden. The number of functions inside
the Objective-C runtime is little so the issue of getting binding faster will not help
it that much. Also I am working on just getting the class's methods marked hidden.
Really your patch only helps targets where GNU binutils works and only where
that specific option has been added (which is not going to be released until later
this year). And my patches will help all targets even with older binutils.
I would rather libobjc be done differently than the other target libraries because
there is no reason to include this option when there are better ways of getting this
working correctly.
-- Pinski