[gnutls-devel] Automatic library initialization
Nikos Mavrogiannopoulos
nmav at gnutls.org
Wed Nov 11 11:33:32 CET 2015
On Tue, Nov 10, 2015 at 4:23 PM, Tim Ruehsen <tim.ruehsen at gmx.de> wrote:
> Hi,
>
> an executable, dynamically linked with GnuTLS, automatically calls
> gnutls_global_init(). And thus (in my case) eats up 60x more CPU cycles than
> needed.
> The executable only needs GnuTLS under some conditions (TLS connection
> requested). In this case it 'manually' calls gnutls_global_init().
There is the undocumented env variable GNUTLS_NO_EXPLICIT_INIT. If you
set it to 1 you disable the use of constructor and destructors to load
gnutls.
> Is there a ./configure option (or similar) that the packagers should/could use
> to avoid that automatic initialization ? Or anything I can do when
> compiling/linking the executable ?
There is no compile time flag for that.
regards,
Nikos
More information about the Gnutls-devel
mailing list