RFC: -Bsymbolic, hidden and protected

Alan Modra amodra@bigpond.net.au
Thu Mar 3 21:54:00 GMT 2005


On Thu, Mar 03, 2005 at 08:55:10AM -0800, H. J. Lu wrote:
> On Thu, Mar 03, 2005 at 07:55:04AM -0800, H. J. Lu wrote:
> > On Thu, Mar 03, 2005 at 11:19:13PM +1030, Alan Modra wrote:
> > > On Wed, Mar 02, 2005 at 08:14:59PM -0800, H. J. Lu wrote:
> > > > Protected visibility has almost everything, but requires
> > > > special handling at run-time.
> > > > 
> > > > I was wondering if we could allow version script to overwrite
> > > > hidden symbols. That is if a symbol is global in version script, we
> > > > export it even if it is marked hidden. It may improve run-time
> > > > performance.
> > > 
> > > How is this going to be different from using protected symbols?
> > 
> > No run-time special handling accociated with protected symbols, which
> > may take extra lookup.
> 
> Also compiler/linker can't optimize protected function pointers.

Which means that if you export hidden function symbols from shared
libraries by means of a version script, you will break function pointer
comparisons.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list