GMP work on symbol visibility
nisse at lysator.liu.se
Thu Sep 1 13:42:38 UTC 2016
tg at gmplib.org (Torbjörn Granlund) writes:
> There are several complex issues I need to understand and resolve. One
> issue is how to handle (unit) testing of hidden functions.
Do we have a lot of functions which (1) you'd want to hide, and (2)
there are unit tests for?
I see two simple solutions: Either do those unittests only against the
static library. Or use visibility "protected".
As I understand it, "protected" does about what we want: Makes sure
internal references don't go via PLT / and GOT. There are some
drawbacks: It doesn't shrink the symbol table, which would be an issue
if we have lots of "protected" symbols, and IIRC, I think Ian said that
glibc's ld.so was poorly optimized for this case, so protected symbols
could make library load slower than using "default" visibility.
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
More information about the gmp-devel