Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109314648
D26352.id76753.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D26352.id76753.diff
View Options
Index: libexec/rtld-elf/rtld.c
===================================================================
--- libexec/rtld-elf/rtld.c
+++ libexec/rtld-elf/rtld.c
@@ -3637,13 +3637,9 @@
continue;
res = symlook_obj(&req, obj);
if (res == 0) {
- if (def == NULL ||
- ELF_ST_BIND(req.sym_out->st_info) != STB_WEAK) {
- def = req.sym_out;
- defobj = req.defobj_out;
- if (ELF_ST_BIND(def->st_info) != STB_WEAK)
- break;
- }
+ def = req.sym_out;
+ defobj = req.defobj_out;
+ break;
}
}
/*
@@ -3651,7 +3647,7 @@
* symbol from there. This is how the application links to
* dynamic linker services such as dlopen.
*/
- if (def == NULL || ELF_ST_BIND(def->st_info) == STB_WEAK) {
+ if (def == NULL) {
res = symlook_obj(&req, &obj_rtld);
if (res == 0) {
def = req.sym_out;
@@ -3686,7 +3682,7 @@
* symbol from there. This is how the application links to
* dynamic linker services such as dlopen.
*/
- if (def == NULL || ELF_ST_BIND(def->st_info) == STB_WEAK) {
+ if (def == NULL) {
res = symlook_obj(&req, &obj_rtld);
if (res == 0) {
def = req.sym_out;
@@ -4249,11 +4245,9 @@
symlook_init_from_req(&req1, req);
/* Search all objects loaded at program start up. */
- if (req->defobj_out == NULL ||
- ELF_ST_BIND(req->sym_out->st_info) == STB_WEAK) {
+ if (req->defobj_out == NULL) {
res = symlook_list(&req1, &list_main, donelist);
- if (res == 0 && (req->defobj_out == NULL ||
- ELF_ST_BIND(req1.sym_out->st_info) != STB_WEAK)) {
+ if (res == 0) {
req->sym_out = req1.sym_out;
req->defobj_out = req1.defobj_out;
assert(req->defobj_out != NULL);
@@ -4262,12 +4256,10 @@
/* Search all DAGs whose roots are RTLD_GLOBAL objects. */
STAILQ_FOREACH(elm, &list_global, link) {
- if (req->defobj_out != NULL &&
- ELF_ST_BIND(req->sym_out->st_info) != STB_WEAK)
+ if (req->defobj_out != NULL)
break;
res = symlook_list(&req1, &elm->obj->dagmembers, donelist);
- if (res == 0 && (req->defobj_out == NULL ||
- ELF_ST_BIND(req1.sym_out->st_info) != STB_WEAK)) {
+ if (res == 0) {
req->sym_out = req1.sym_out;
req->defobj_out = req1.defobj_out;
assert(req->defobj_out != NULL);
@@ -4312,12 +4304,10 @@
/* Search all dlopened DAGs containing the referencing object. */
STAILQ_FOREACH(elm, &refobj->dldags, link) {
- if (req->sym_out != NULL &&
- ELF_ST_BIND(req->sym_out->st_info) != STB_WEAK)
+ if (req->sym_out != NULL)
break;
res = symlook_list(&req1, &elm->obj->dagmembers, &donelist);
- if (res == 0 && (req->sym_out == NULL ||
- ELF_ST_BIND(req1.sym_out->st_info) != STB_WEAK)) {
+ if (res == 0) {
req->sym_out = req1.sym_out;
req->defobj_out = req1.defobj_out;
assert(req->defobj_out != NULL);
@@ -4329,8 +4319,7 @@
* symbol from there. This is how the application links to
* dynamic linker services such as dlopen.
*/
- if (req->sym_out == NULL ||
- ELF_ST_BIND(req->sym_out->st_info) == STB_WEAK) {
+ if (req->sym_out == NULL) {
res = symlook_obj(&req1, &obj_rtld);
if (res == 0) {
req->sym_out = req1.sym_out;
@@ -4358,11 +4347,10 @@
continue;
symlook_init_from_req(&req1, req);
if ((res = symlook_obj(&req1, elm->obj)) == 0) {
- if (def == NULL || ELF_ST_BIND(req1.sym_out->st_info) != STB_WEAK) {
+ if (def == NULL) {
def = req1.sym_out;
defobj = req1.defobj_out;
- if (ELF_ST_BIND(def->st_info) != STB_WEAK)
- break;
+ break;
}
}
}
@@ -4396,11 +4384,10 @@
if (n->obj == NULL ||
(res = symlook_list(&req1, &n->obj->dagmembers, dlp)) != 0)
continue;
- if (def == NULL || ELF_ST_BIND(req1.sym_out->st_info) != STB_WEAK) {
+ if (def == NULL) {
def = req1.sym_out;
defobj = req1.defobj_out;
- if (ELF_ST_BIND(def->st_info) != STB_WEAK)
- break;
+ break;
}
}
if (def != NULL) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 4, 11:23 AM (5 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16452621
Default Alt Text
D26352.id76753.diff (3 KB)
Attached To
Mode
D26352: rtld: Switch to the standard symbol lookup behavior if LD_DYNAMIC_WEAK=0
Attached
Detach File
Event Timeline
Log In to Comment