]> git.ipfire.org Git - thirdparty/strongswan.git/commit - configure.ac
plugin-loader: Add facility to register plugin constructors
authorTobias Brunner <tobias@strongswan.org>
Fri, 28 Apr 2017 15:41:57 +0000 (17:41 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 23 May 2017 16:29:12 +0000 (18:29 +0200)
commit1a06bf03f9a0be7f54bdc412475f537f623ca99f
tree3a6a7575f561613a51c5d2a9be3b30ea89421f1e
parent6ce649a8a6f913a56ccf5b4e60d44f01f21ff8a3
plugin-loader: Add facility to register plugin constructors

Enabled when building monolithically and statically.

This should allow us to work around the -whole-archive issue with
libtool.  If the libraries register the plugin constructors they provide
they reference the constructors and will therefore prevent the linker from
removing these seemingly unused symbols from the final executable.

For use cases where dlsym() can be used, e.g. because the static libraries
are manually linked with -whole-archive (Linux) or -force-load (Apple),
this can be disabled by passing ss_cv_static_plugin_constructors=no to
the configure script.
configure.ac
src/libstrongswan/plugins/plugin_loader.c
src/libstrongswan/plugins/plugin_loader.h