This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: OO.o / ld / -Bsymbolic patch ...


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. 


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