GMP work on symbol visibility

Marc Glisse marc.glisse at
Wed Aug 31 21:50:31 UTC 2016

On Wed, 31 Aug 2016, Torbjörn Granlund wrote:

> There are several complex issues I need to understand and resolve.  One
> issue is how to handle (unit) testing of hidden functions.  I will
> probably resolve that with alias symbols such as foo_for_testing as an
> alias for foo.

Would that be only in a temporary, testing-only, or also in the 
installed I am guessing the second, but it seems a bit sad that 
the exported symbol list remains polluted.

> Another issue is with and its dependency on  As
> separate shared libs, hidden symbols of will not be reachable
> from, which of course means we cannot hide them.  Also,
> there will be no performance wins for any references to
> I see two solutions:
> (1) If we really want to discourage external use, arrange an alias to
> something wierd, making libgmpxx reach the symbol foo as fuckhead_foo.
> (2) Put (allmost) all of in  This gives the best
> performance.

Does use that many private functions from and are 
they performance critical? To me, is very small and only 
contains I/O functions, where the overhead of a few calls shouldn't matter 
that much.

Marc Glisse

More information about the gmp-devel mailing list