OO.o / ld / -Bsymbolic patch ...
H. J. Lu
hjl@lucon.org
Wed Jul 6 13:54:00 GMT 2005
On Wed, Jul 06, 2005 at 02:34:58PM +0200, Jakub Jelinek wrote:
> > Well - I can of course try to get up-stream OO.o to turn every single
> > function & member decl. from:
> >
> > virtual void doFoo();
> > to
> > #define PROTECTED __attribute__ ((visibility("protected)))
> > ..
> > virtual PROTECTED void doFoo();
>
> Note that "protected" visibility is something you almost never want to use.
> It is actually usually slower than not using it at all (involves usually
> two symbol lookups instead of one). The reason for that is C/C++ pointer
> equivalence requirements. "hidden" is useful and actively used by many
> projects. "protected" visibility that disregards C/C++ pointer equivalence
> requirements is used e.g. by glibc, I think Gtk2 etc., though complicated
> macros and markups in the source.
FYI, "protected" visibility that disregards C/C++ pointer equivalence
can be achieved by "hidden" visibility with forced global via version
script, using the current Linux. It is very trivial to do.
H.J.
binutils.
More information about the Binutils
mailing list