summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-03-12 17:33:40 +0000
committerkib <kib@FreeBSD.org>2016-03-12 17:33:40 +0000
commit32bf5aa11d449f2e148cec5c2272be9962232192 (patch)
tree9cc9233dc3bbf22f0133910944ebc9ee5c1f9c87 /lib/libthr
parent5dfb941cf33c8900cbad0f36df3eda5b938c602b (diff)
downloadFreeBSD-src-32bf5aa11d449f2e148cec5c2272be9962232192.zip
FreeBSD-src-32bf5aa11d449f2e148cec5c2272be9962232192.tar.gz
MFC r295407:
Make libc __pthread_map_stacks_exec() interposed.
Diffstat (limited to 'lib/libthr')
-rw-r--r--lib/libthr/pthread.map2
-rw-r--r--lib/libthr/thread/thr_private.h2
-rw-r--r--lib/libthr/thread/thr_stack.c3
-rw-r--r--lib/libthr/thread/thr_syscalls.c1
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/libthr/pthread.map b/lib/libthr/pthread.map
index 0903989..9fb72eb 100644
--- a/lib/libthr/pthread.map
+++ b/lib/libthr/pthread.map
@@ -295,8 +295,6 @@ FBSDprivate_1.0 {
_thread_size_key;
_thread_state_running;
_thread_state_zoombie;
-
- __pthread_map_stacks_exec;
};
FBSD_1.1 {
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
index 3597485..88a9809 100644
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -928,6 +928,8 @@ int __thr_sigwait(const sigset_t *set, int *sig);
int __thr_sigwaitinfo(const sigset_t *set, siginfo_t *info);
int __thr_swapcontext(ucontext_t *oucp, const ucontext_t *ucp);
+void __thr_map_stacks_exec(void);
+
struct _spinlock;
void __thr_spinunlock(struct _spinlock *lck);
void __thr_spinlock(struct _spinlock *lck);
diff --git a/lib/libthr/thread/thr_stack.c b/lib/libthr/thread/thr_stack.c
index e5d149e..74e1329 100644
--- a/lib/libthr/thread/thr_stack.c
+++ b/lib/libthr/thread/thr_stack.c
@@ -161,9 +161,8 @@ singlethread_map_stacks_exec(void)
rlim.rlim_cur, _rtld_get_stack_prot());
}
-void __pthread_map_stacks_exec(void);
void
-__pthread_map_stacks_exec(void)
+__thr_map_stacks_exec(void)
{
struct pthread *curthread, *thrd;
struct stack *st;
diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c
index 2484e52..5dd20da 100644
--- a/lib/libthr/thread/thr_syscalls.c
+++ b/lib/libthr/thread/thr_syscalls.c
@@ -664,6 +664,7 @@ __thr_interpose_libc(void)
SLOT(kevent);
SLOT(wait6);
SLOT(ppoll);
+ SLOT(map_stacks_exec);
#undef SLOT
*(__libc_interposing_slot(
INTERPOS__pthread_mutex_init_calloc_cb)) =
OpenPOWER on IntegriCloud