Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F131734779
D9317.id24388.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
D9317.id24388.diff
View Options
Index: libexec/rtld-elf/rtld.c
===================================================================
--- libexec/rtld-elf/rtld.c
+++ libexec/rtld-elf/rtld.c
@@ -3956,10 +3956,14 @@
donelist_init(&donelist);
symlook_init_from_req(&req1, req);
- /* Look first in the referencing object if linked symbolically. */
- if (refobj->symbolic && !donelist_check(&donelist, refobj)) {
+ /*
+ * Look first in the referencing object if linked symbolically,
+ * and similarly handle protected symbols.
+ */
+ if (!donelist_check(&donelist, refobj)) {
res = symlook_obj(&req1, refobj);
- if (res == 0) {
+ if (res == 0 && (refobj->symbolic ||
+ ELF_ST_VISIBILITY(req1.sym_out->st_other) == STV_PROTECTED)) {
req->sym_out = req1.sym_out;
req->defobj_out = req1.defobj_out;
assert(req->defobj_out != NULL);
Index: sys/sys/elf_generic.h
===================================================================
--- sys/sys/elf_generic.h
+++ sys/sys/elf_generic.h
@@ -84,5 +84,6 @@
#define ELF_ST_BIND __ELFN(ST_BIND)
#define ELF_ST_TYPE __ELFN(ST_TYPE)
#define ELF_ST_INFO __ELFN(ST_INFO)
+#define ELF_ST_VISIBILITY __ELFN(ST_VISIBILITY)
#endif /* !_SYS_ELF_GENERIC_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 11, 6:15 PM (17 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23587421
Default Alt Text
D9317.id24388.diff (1 KB)
Attached To
Mode
D9317: Handle protected symbols in rtld.
Attached
Detach File
Event Timeline
Log In to Comment