From 6c96090b5937cfdefdc95ebe2beaa491db5008ff Mon Sep 17 00:00:00 2001 From: "Christian W. Zuckschwerdt" Date: Wed, 10 Apr 2024 18:54:00 +0200 Subject: [PATCH] Fix SoapySDR::loadModule dlopen to hide symbols using RTLD_LOCAL (#434) Closes #430 Co-authored-by: Niro Mahasinghe --- lib/Modules.in.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Modules.in.cpp b/lib/Modules.in.cpp index fcb76d44..01e1c1a5 100644 --- a/lib/Modules.in.cpp +++ b/lib/Modules.in.cpp @@ -256,7 +256,7 @@ std::string SoapySDR::loadModule(const std::string &path) getModuleLoading().clear(); if (handle == NULL) return "LoadLibrary() failed: " + GetLastErrorMessage(); #else - void *handle = dlopen(path.c_str(), RTLD_LAZY); + void *handle = dlopen(path.c_str(), RTLD_LAZY | RTLD_LOCAL); getModuleLoading().clear(); if (handle == NULL) return "dlopen() failed: " + std::string(dlerror()); #endif