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)