build checksums for charon plugins
authorMartin Willi <martin@strongswan.org>
Fri, 19 Jun 2009 14:21:09 +0000 (16:21 +0200)
committerMartin Willi <martin@strongswan.org>
Mon, 22 Jun 2009 13:47:17 +0000 (15:47 +0200)
src/libstrongswan/checksum/Makefile.am
src/libstrongswan/checksum/checksum_builder.c

index 6a109d2..aaed128 100644 (file)
@@ -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
index 03b9d85..b917e11 100644 (file)
 
 #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);