Reason for separate libdns and libisc "export libraries"

Adam Tkac atkac at redhat.com
Mon Oct 11 12:01:56 UTC 2010


Hello all,

I would like to ask you for the reason why there are separate versions
of libdns, libisc & friends, called "export libraries" in BIND 9.7
series.

If I understand correctly those export libs are supposed to be used
from non-BIND9 applications and some methods are lightweight compared
to full-featured BIND9 versions. In my opinion it's good idea to offer
two versions of certain methods. However I don't understand why those
methods need to be in separate library and, which is even worse, this
library has the same name as full featured BIND9 lib. It is the best
way to various run-time issues, like unresolved symbols. Another issue
is that isc-config.sh utility (which is used to determine CFLAGS,
LDFLAGS etc) has no support for this dual-library setup.

In my opinion export libs and standard libs should be merged together
or should be renamed (for example to libdns-export.so). I must note
rename is probably worse case because dynamic linker can randomly
pick methods with same name from libdns.so or from libdns-export.so.
I think the best solution is to merge two libs into one and select
methods via preprocessor flag (-DBIND9). The merged library will
look like:

isc/namespace.h:

#ifdef BIND9
#define isc_something isc__something
#endif

libisc.so:
isc_something
isc__something

So there will be no runtime issues. May I ask you if you can change
current dynamic libraries setup somehow? I can prepare the patches,
if you are interested.

Regards, Adam

-- 
Adam Tkac, Red Hat, Inc.



More information about the bind-users mailing list