diff options
Diffstat (limited to 'lib/libthr/thread/thr_rtld.c')
-rw-r--r-- | lib/libthr/thread/thr_rtld.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c index e6af702..d9dd94d 100644 --- a/lib/libthr/thread/thr_rtld.c +++ b/lib/libthr/thread/thr_rtld.c @@ -31,6 +31,8 @@ * A lockless rwlock for rtld. */ #include <sys/cdefs.h> +#include <sys/mman.h> +#include <link.h> #include <stdlib.h> #include <string.h> @@ -194,6 +196,9 @@ _thr_rtld_init(void) /* force to resolve memcpy PLT */ memcpy(&dummy, &dummy, sizeof(dummy)); + mprotect(NULL, 0, 0); + _rtld_get_stack_prot(); + li.lock_create = _thr_rtld_lock_create; li.lock_destroy = _thr_rtld_lock_destroy; li.rlock_acquire = _thr_rtld_rlock_acquire; |