The attached patches fix compilation issues with mini-gmp, add a gitlab build rule, and prevent the symbols defined in gmp-glue.h from being exported into nettle's ABI.
The latter was to avoid abidiff differences to hogweed's ABI when built with different gmp versions. For that I renamed the gmp-glue _nettle_* symbols to _inettle_*.
regards, Nikos
Nikos Mavrogiannopoulos nmav@redhat.com writes:
Can you explain what the problem is? I know there's been some hassle also for the debian maintainer, but apparently solvable by other means.
I don't like the "_inettle_" prefix, though. We shouldn't add even more prefixes to the symbol namespace (for an ELF shared library, it might not matter much, if the point is to make the symbols in question unexported, but we also have static libraries).
Would it work to instead exclude _nettle_mp?_* or so?
Why is this? Test code using the gmp-glue functions, and they're now hidden in the library?
Applied.
Applied.
Regards, /Niels
On Tue, 2016-03-15 at 19:50 +0100, Niels Möller wrote:
It's a question of, if they are not part of the ABI then why export them to applications? By exporting internal functions you allow applications to use them and you'll have issues when you try to refactor them; see previous discussion with RSA blinding: https://lists.lysator.liu.se/pipermail/nettle-bugs/2015/002995.html
One other approach would to be keep a different namespace for private symbols that need to be exported for test applications and so.
That could be an option if it would work with the version script. However, that would make the version script a place to list the functions not to be exported, rather than vice-versa, and thus would be hard to manage.
It includes the gmp-glue functions directly since they are not available for use.
regards, Nikos
Nikos Mavrogiannopoulos nmav@redhat.com writes:
One other approach would to be keep a different namespace for private symbols that need to be exported for test applications and so.
That makes sense. But I don't understand what type of "namespaces" you refer to here. Can you explain? How would a test program gain access to functions in the internal namespace?
Hmm. And yet another option might be to use visibility attributes (an ELF feature, I understand roughly how they work, but I don't have any real experience).
Regards, /Niels
On Wed, 2016-03-16 at 10:46 +0100, Niels Möller wrote:
In gnutls I keep the supported ABI under the GNUTLS_3_4 namespace while functions that need to be exported for testing or other purposes are assigned to GNUTLS_PRIVATE_3_4.
I set that using the version script: https://gitlab.com/gnutls/gnutls/blob/master/lib/libgnutls.map
I don't know if there are any other best practices.
regards, Nikos
nettle-bugs@lists.lysator.liu.se