RFC: -Bsymbolic, hidden and protected

H. J. Lu hjl@lucon.org
Thu Mar 3 04:15:00 GMT 2005


Loading an ELF DSO may require many relocations and accesing global
symbols within the DSO have to go through PLT/GOT, even if they are
defined within the DSO. -Bsymbloc avoids relocatins against global
symbols defined within the DSO. But it is too late for compiler to
take the full advantage of it and we can't do it selectly for
individual symbol. Hidden visibility will optimize everything, but it
makes global symbols local to the DSO. You can't use it on exported
symbols. 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.


H.J.



More information about the Binutils mailing list