aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2009-06-30 03:05:50 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2009-06-30 03:05:50 +0000
commit55f7250f38a12767c8dcf9856ad0c64e3a1ad32c (patch)
treec9d98bc01ccf5b54a7f1cbff5a37145bec03c918 /libexec
parentcca8fe7f8f89babfb662c40351c063ccd8c70e82 (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/rtld.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index bb352389e13d..805258ad4d09 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -1966,6 +1966,16 @@ do_dlsym(void *handle, const char *name, void *retaddr, const Ver_Entry *ve,
/* Search main program and all libraries loaded by it. */
def = symlook_list(name, hash, &list_main, &defobj, ve, flags,
&donelist);
+
+ /*
+ * We do not distinguish between 'main' object and global scope.
+ * If symbol is not defined by objects loaded at startup, continue
+ * search among dynamically loaded objects with RTLD_GLOBAL
+ * scope.
+ */
+ if (def == NULL)
+ def = symlook_list(name, hash, &list_global, &defobj, ve,
+ flags, &donelist);
} else {
Needed_Entry fake;