On Tue, 2016-03-15 at 19:50 +0100, Niels Möller wrote:
Nikos Mavrogiannopoulos nmav@redhat.com writes:
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_*.
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.
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.
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?
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.
--- a/testsuite/Makefile.in
+++ b/testsuite/Makefile.in @@ -84,7 +84,7 @@ all: $(EXTRA_TARGETS) # explicit rule for each and every executable. LIB_HOGWEED = @IF_HOGWEED@ -lhogweed -TEST_OBJS = testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \ +TEST_OBJS = testutils.$(OBJEXT) ../gmp-glue.$(OBJEXT) ../nettle- internal.$(OBJEXT) \ $(LIB_HOGWEED) -lnettle $(LIBS)
Why is this? Test code using the gmp-glue functions, and they're now hidden in the library?
It includes the gmp-glue functions directly since they are not available for use.
regards, Nikos