Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102726613
D42841.id130814.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42841.id130814.diff
View Options
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -240,6 +240,7 @@
bool ver_checked : 1; /* True if processed by rtld_verify_object_versions */
bool textrel : 1; /* True if there are relocations to text seg */
bool symbolic : 1; /* True if generated with "-Bsymbolic" */
+ bool deepbind : 1; /* True if loaded with RTLD_DEEPBIND" */
bool bind_now : 1; /* True if all relocations should be made first */
bool traced : 1; /* Already printed in ldd trace output */
bool jmpslots_done : 1; /* Already have relocated the jump slots */
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -3755,7 +3755,7 @@
if (!obj->init_done) {
/* We loaded something new and have to init something. */
if ((lo_flags & RTLD_LO_DEEPBIND) != 0)
- obj->symbolic = true;
+ obj->deepbind = true;
result = 0;
if ((lo_flags & (RTLD_LO_EARLY | RTLD_LO_IGNSTLS)) == 0 &&
obj->static_tls && !allocate_tls_offset(obj)) {
@@ -4581,7 +4581,8 @@
if (refobj->symbolic || req->defobj_out != NULL)
donelist_check(&donelist, refobj);
- symlook_global(req, &donelist);
+ if (!refobj->deepbind)
+ symlook_global(req, &donelist);
/* Search all dlopened DAGs containing the referencing object. */
STAILQ_FOREACH(elm, &refobj->dldags, link) {
@@ -4597,6 +4598,9 @@
}
}
+ if (refobj->deepbind)
+ symlook_global(req, &donelist);
+
/*
* Search the dynamic linker itself, and possibly resolve the
* symbol from there. This is how the application links to
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 10:25 AM (21 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14674678
Default Alt Text
D42841.id130814.diff (1 KB)
Attached To
Mode
D42841: RTLD_DEEPBIND: make lookup not just symbolic, but walk all refobj' DAGs
Attached
Detach File
Event Timeline
Log In to Comment