aboutsummaryrefslogtreecommitdiff
path: root/backends/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'backends/plugins')
-rw-r--r--backends/plugins/elf/elf-provider.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/backends/plugins/elf/elf-provider.cpp b/backends/plugins/elf/elf-provider.cpp
index f3f6bace07..ddffde3e38 100644
--- a/backends/plugins/elf/elf-provider.cpp
+++ b/backends/plugins/elf/elf-provider.cpp
@@ -113,11 +113,13 @@ bool ELFPlugin::loadPlugin() {
bool ret = DynamicPlugin::loadPlugin();
#ifdef ELF_LOADER_CXA_ATEXIT
- // FIXME HACK: Reverse HACK of findSymbol() :P
- VoidFunc tmp;
- tmp = findSymbol("__dso_handle");
- memcpy(&_dso_handle, &tmp, sizeof(VoidFunc));
- debug(2, "elfloader: __dso_handle is %p", _dso_handle);
+ if (ret) {
+ // FIXME HACK: Reverse HACK of findSymbol() :P
+ VoidFunc tmp;
+ tmp = findSymbol("__dso_handle");
+ memcpy(&_dso_handle, &tmp, sizeof(VoidFunc));
+ debug(2, "elfloader: __dso_handle is %p", _dso_handle);
+ }
#endif
_dlHandle->discard_symtab();