[Ns-developers] GCC 4 -fvisibility=hidden

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Sun Jan 25 11:32:56 PST 2009


On Sun, 2009-01-25 at 19:29 +0000, Gustavo Carneiro wrote:

>         1) a large fraction of performance-sensitive code is also
>         'public' so
>         you can't mark it 'hidden' so, you lose all the performance
>         gain of this
>         marking (there are 3 big items: the packet.h, simulator.h and
>         object.h
>         code).
> 
> IIRC, I think what GTK+ and friends are doing these days is actually
> maintain a duplicate set of symbols.  For each API function, it is
> declared as both a hidden and public, and Gtk+ itself ends up calling
> only the hidden symbols, bypassing the GOT indirection, although a
> public version of the function symbol is also exported.

It's been a while since I did not look at this, so how do they do it ?

Mathieu



More information about the Ns-developers mailing list