FreeBSD Bugzilla – Attachment 13104 Details for
Bug 25059
dlopen(..,RTLD_GLOBAL) doesn't work for shared libraries linked to the loaded one
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
rtld.diff
rtld.diff (text/x-patch), 1.97 KB, created by
des
on 2002-02-23 23:21:49 UTC
(
hide
)
Description:
rtld.diff
Filename:
MIME Type:
Creator:
des
Created:
2002-02-23 23:21:49 UTC
Size:
1.97 KB
patch
obsolete
>Index: rtld.c >=================================================================== >RCS file: /home/ncvs/src/libexec/rtld-elf/rtld.c,v >retrieving revision 1.60 >diff -u -r1.60 rtld.c >--- rtld.c 17 Feb 2002 07:00:25 -0000 1.60 >+++ rtld.c 23 Feb 2002 23:21:28 -0000 >@@ -1329,6 +1329,7 @@ > elm = NEW(Objlist_Entry); > elm->obj = obj; > STAILQ_INSERT_TAIL(list, elm, link); >+ obj->global = true; > } > > static void >@@ -1581,7 +1582,7 @@ > > if (obj) { > obj->dl_refcount++; >- if (mode & RTLD_GLOBAL && objlist_find(&list_global, obj) == NULL) >+ if (mode & RTLD_GLOBAL && !obj->global) > objlist_push_tail(&list_global, obj); > mode &= RTLD_MODEMASK; > if (*old_obj_tail != NULL) { /* We loaded something new. */ >@@ -1915,7 +1916,7 @@ > } > } > >- /* Search all RTLD_GLOBAL objects. */ >+ /* Search all RTLD_GLOBAL objects and their DAGs. */ > if (def == NULL || ELF_ST_BIND(def->st_info) == STB_WEAK) { > symp = symlook_list(name, hash, &list_global, &obj, in_plt, &donelist); > if (symp != NULL && >@@ -1965,6 +1966,12 @@ > if (ELF_ST_BIND(def->st_info) != STB_WEAK) > break; > } >+ } else if (elm->obj->global) { >+ /* search the DAGs of global objects */ >+ symp = symlook_list(name, hash, &elm->obj->dagmembers, >+ defobj_out, in_plt, dlp); >+ if (symp != NULL) >+ return symp; > } > } > if (def != NULL) >Index: rtld.h >=================================================================== >RCS file: /home/ncvs/src/libexec/rtld-elf/rtld.h,v >retrieving revision 1.24 >diff -u -r1.24 rtld.h >--- rtld.h 29 Oct 2001 10:10:02 -0000 1.24 >+++ rtld.h 23 Feb 2002 23:02:18 -0000 >@@ -155,6 +155,7 @@ > bool traced; /* Already printed in ldd trace output */ > bool jmpslots_done; /* Already have relocated the jump slots */ > bool init_done; /* Already have added object to init list */ >+ bool global; /* This object is on the global list */ > > struct link_map linkmap; /* for GDB */ > Objlist dldags; /* Object belongs to these dlopened DAGs (%) */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 25059
: 13104