From 87577423855cbdda4b74dbe20c91f2db507807e6 Mon Sep 17 00:00:00 2001 From: Per Nilsson Date: Wed, 2 Mar 2022 14:06:05 +0100 Subject: [PATCH] Don't specify RTLD_GLOBAL --- common/ecdh.c | 2 +- examples/p11_generate_rsa.c | 2 +- pkcs11/tests/common.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/ecdh.c b/common/ecdh.c index 170d9174..66ca9c9b 100644 --- a/common/ecdh.c +++ b/common/ecdh.c @@ -1580,7 +1580,7 @@ int ecdh_load_module(const char *module, FILE *out) { } if (strcmp(module, "-")) { - module_handle = dlopen(module, RTLD_NOW | RTLD_GLOBAL); + module_handle = dlopen(module, RTLD_NOW); if (module_handle == 0) { fprintf(out, "Can't open shared library '%s': %s\n", module, dlerror()); return CKR_ARGUMENTS_BAD; diff --git a/examples/p11_generate_rsa.c b/examples/p11_generate_rsa.c index 344c2739..e6a5e06b 100644 --- a/examples/p11_generate_rsa.c +++ b/examples/p11_generate_rsa.c @@ -32,7 +32,7 @@ int main(int argc, char *argv[]) { } CK_C_GetFunctionList fn; - void *handle = dlopen(argv[1], RTLD_NOW | RTLD_GLOBAL); + void *handle = dlopen(argv[1], RTLD_NOW); assert(handle != NULL); *(void **) (&fn) = dlsym(handle, "C_GetFunctionList"); diff --git a/pkcs11/tests/common.c b/pkcs11/tests/common.c index c651bebb..cc008ffe 100644 --- a/pkcs11/tests/common.c +++ b/pkcs11/tests/common.c @@ -26,7 +26,7 @@ #include "common.h" void *open_module(const char *path) { - void *handle = dlopen(path, RTLD_NOW | RTLD_GLOBAL); + void *handle = dlopen(path, RTLD_NOW); assert(handle != NULL); return handle; }