]> git.ipfire.org Git - thirdparty/bind9.git/commit
Make linker include library ctor/dtor in statically linked libisc
authorOndřej Surý <ondrej@isc.org>
Fri, 26 Feb 2021 20:09:48 +0000 (21:09 +0100)
committerOndřej Surý <ondrej@isc.org>
Fri, 26 Feb 2021 20:19:33 +0000 (21:19 +0100)
commit86298fd112301ca30c1a44d38bc50a26f4eb39e5
tree4b189aea5845735835209e538b8d07e6a46adeb2
parentf92b77ff0de07c150cabe48e4c8235ce15b9c596
Make linker include library ctor/dtor in statically linked libisc

Under normal situation, the linker throws out all symbols from
compilation unit when no symbols are used in the final binary, which is
the case for lib/isc/lib.c.  This commit adds empty function to lib.c
that's being called from different CU (mem.c in this case) and that
makes the linker to include all the symbols including the normally
unreferenced isc__initialize() and isc__shutdown() in the final binary.
lib/isc/include/isc/lib.h
lib/isc/lib.c
lib/isc/mem.c
lib/isc/win32/libisc.def.in