aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libstrongswan/checksum/Makefile.am3
-rw-r--r--src/libstrongswan/checksum/checksum_builder.c17
2 files changed, 15 insertions, 5 deletions
diff --git a/src/libstrongswan/checksum/Makefile.am b/src/libstrongswan/checksum/Makefile.am
index 6a109d27e..aaed128dc 100644
--- a/src/libstrongswan/checksum/Makefile.am
+++ b/src/libstrongswan/checksum/Makefile.am
@@ -9,8 +9,9 @@ checksum_builder_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
BUILT_SOURCES = checksum.c
CLEANFILES = checksum.c checksum_builder
INCLUDES = -I$(top_srcdir)/src/libstrongswan
+AM_CFLAGS = -rdynamic
-libs = $(shell find $(top_builddir)/src/libstrongswan -name 'libstrongswan*.so')
+libs = $(shell find $(top_builddir)/src -name 'libstrongswan*.so')
checksum.c : checksum_builder $(libs)
./checksum_builder $(libs) > checksum.c
diff --git a/src/libstrongswan/checksum/checksum_builder.c b/src/libstrongswan/checksum/checksum_builder.c
index 03b9d852e..b917e1128 100644
--- a/src/libstrongswan/checksum/checksum_builder.c
+++ b/src/libstrongswan/checksum/checksum_builder.c
@@ -19,9 +19,18 @@
#include <library.h>
-
-/* we need some faked symbols to load charon plugins */
-char *charon = "adsf";
+/* we need to fake some charon symbols to dlopen() its plugins */
+void *eap_type_names, *auth_class_names, *charon, *protocol_id_names,
+*action_names, *ipsec_mode_names, *ike_sa_state_names, *child_sa_state_names,
+*proposal_create_default, *peer_cfg_create, *ike_cfg_create, *child_cfg_create,
+*traffic_selector_create_dynamic, *callback_job_create, *delete_ike_sa_job_create,
+*eap_type_from_string, *auth_cfg_create, *proposal_create_from_string,
+*traffic_selector_create_from_subnet, *traffic_selector_create_from_bytes,
+*eap_payload_create_data, *ike_sa_create, *child_sa_create, *policy_dir_names,
+*controller_cb_empty, *proposal_create, *ipcomp_transform_names,
+*traffic_selector_create_from_string, *update_sa_job_create, *ike_sa_id_create,
+*rekey_child_sa_job_create, *roam_job_create, *migrate_job_create,
+*acquire_job_create, *delete_child_sa_job_create, *debug_names;
int main(int argc, char* argv[])
{
@@ -72,7 +81,7 @@ int main(int argc, char* argv[])
fsum = integrity->build_file(integrity, path);
ssum = 0;
- handle = dlopen(path, RTLD_GLOBAL|RTLD_NOW);
+ handle = dlopen(path, RTLD_LAZY);
if (handle)
{
symbol = dlsym(handle, sname);