Page MenuHomeFreeBSD

D24841.id71789.diff
No OneTemporary

D24841.id71789.diff

Index: include/dlfcn.h
===================================================================
--- include/dlfcn.h
+++ include/dlfcn.h
@@ -47,6 +47,8 @@
#define RTLD_TRACE 0x200 /* Trace loaded objects and exit. */
#define RTLD_NODELETE 0x01000 /* Do not remove members. */
#define RTLD_NOLOAD 0x02000 /* Do not load if not already loaded. */
+#define RTLD_DEEPBIND 0x04000 /* Put symbols from the dso ahead of
+ the global list */
/*
* Request arguments for dlinfo().
Index: libexec/rtld-elf/rtld.h
===================================================================
--- libexec/rtld-elf/rtld.h
+++ libexec/rtld-elf/rtld.h
@@ -309,6 +309,7 @@
#define RTLD_LO_EARLY 0x20 /* Do not call ctors, postpone it to the
initialization during the image start. */
#define RTLD_LO_IGNSTLS 0x40 /* Do not allocate static TLS */
+#define RTLD_LO_DEEPBIND 0x80 /* Force symbolic for this object */
/*
* Symbol cache entry used during relocation to avoid multiple lookups
Index: libexec/rtld-elf/rtld.c
===================================================================
--- libexec/rtld-elf/rtld.c
+++ libexec/rtld-elf/rtld.c
@@ -3366,6 +3366,8 @@
lo_flags |= RTLD_LO_NODELETE;
if (mode & RTLD_NOLOAD)
lo_flags |= RTLD_LO_NOLOAD;
+ if (mode & RTLD_DEEPBIND)
+ lo_flags |= RTLD_LO_DEEPBIND;
if (ld_tracing != NULL)
lo_flags |= RTLD_LO_TRACE | RTLD_LO_IGNSTLS;
@@ -3417,6 +3419,8 @@
if (globallist_next(old_obj_tail) != NULL) {
/* We loaded something new. */
assert(globallist_next(old_obj_tail) == obj);
+ if ((lo_flags & RTLD_LO_DEEPBIND) != 0)
+ obj->symbolic = true;
result = 0;
if ((lo_flags & (RTLD_LO_EARLY | RTLD_LO_IGNSTLS)) == 0 &&
obj->static_tls && !allocate_tls_offset(obj)) {

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 12, 12:51 AM (14 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29558295
Default Alt Text
D24841.id71789.diff (1 KB)

Event Timeline