OO.o / ld / -Bsymbolic patch ...

michael meeks michael.meeks@novell.com
Wed Jul 6 14:05:00 GMT 2005


On Wed, 2005-07-06 at 14:34 +0200, Jakub Jelinek wrote:
> 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).

	Yes - I saw some of that in the LD_DEBUG=symbols output - an
interesting behavior; it does eliminate the internal relocations though
- but it's unpleasant from every angle as you say. Is there no
visibility attribute will emulate -Bsymbolic per symbol ? of
default/internal/hidden/protected - protected seemed the only one that
came close.

>   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.

	Well; we already use 'default' & 'hidden' extensively all across OO.o
already - and build with -fvisibility-hidden and
-fvisibility-inlines-hidden but this only goes so far. We still get left
with tens of thousands of symbol-driven relocations, many internal, that
we can't get rid of with -Bsymbolic; since it internally binds the weak
symbols we want to keep un-bound too.

	So - is there a better / different / recommended way (short of
pre-linking) to bind the non-weak symbols internally ? I'd love to find
something that didn't involve fiddling with binutils.

	Thanks,

		Michael.

-- 
 michael.meeks@novell.com  <><, Pseudo Engineer, itinerant idiot



More information about the Binutils mailing list