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 libgmp.so, or also in the installed libgmp.so? I am guessing the second, but it seems a bit sad that the exported symbol list remains polluted.
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 libgmp.so. 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 performance.
Does libgmpxx.so use that many private functions from libgmp.so and are they performance critical? To me, libgmpxx.so is very small and only contains I/O functions, where the overhead of a few calls shouldn't matter that much.
-- Marc Glisse _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel