GMP work on symbol visibility
tg at gmplib.org
Wed Aug 31 21:27:40 UTC 2016
I am (finally!) resuming work on symbol visibility for libgmp.so. This
means that internal references will no longer be indirect through PLT or
GOT, allowing the shared library to run as fast as the static library.
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.
Another issue is with libgmpxx.so and its dependency on libgmp.so. As
separate shared libs, hidden symbols of libgmp.so will not be reachable
from libgmpxx.so, which of course means we cannot hide them. Also,
there will be no performance wins for any libgmpxx.so 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 libgmp.so in libgmpxx.so. This gives the best
I am interested in your feedback.
Please encrypt, key id 0xC8601622
More information about the gmp-devel