From 47bc66631194a81a111b321583aef292260cb416 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 1 Feb 2009 18:40:42 +0000 Subject: [PATCH] The assumption that the program image is not used for relocation of dlopen()ed objects was incorrect. This should fix problems with ports of software with a plugin/add-on interface. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29112 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/runtime_loader/elf.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/system/runtime_loader/elf.cpp b/src/system/runtime_loader/elf.cpp index fa29a15ef3..6ba5e55194 100644 --- a/src/system/runtime_loader/elf.cpp +++ b/src/system/runtime_loader/elf.cpp @@ -2141,10 +2141,9 @@ load_program(char const *path, void **_entry) if (status < B_OK) goto err; - // Set RTLD_GLOBAL on all libraries, but clear it on the program image. + // Set RTLD_GLOBAL on all libraries including the program. // This results in the desired symbol resolution for dlopen()ed libraries. set_image_flags_recursively(sProgramImage, RTLD_GLOBAL); - sProgramImage->flags &= ~RTLD_GLOBAL; status = relocate_dependencies(sProgramImage); if (status < B_OK)