diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-01 05:40:07 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-01 05:40:07 +0000 |
commit | 6552896c83d8e0c94ad668c1e07eec78a5035820 (patch) | |
tree | d856dc9a981eb7f505c48e9852ed0636e4fb6f76 /lib/csu/crt0.c | |
parent | 49917aa9a3d7bc9525154ccaed369d2ce4311649 (diff) |
In static binaries, invoke kbind() once to disable it.
With much assistance from miod@
ok deraadt@@
Diffstat (limited to 'lib/csu/crt0.c')
-rw-r--r-- | lib/csu/crt0.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/csu/crt0.c b/lib/csu/crt0.c index f130e57af6a..9589b9009ac 100644 --- a/lib/csu/crt0.c +++ b/lib/csu/crt0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crt0.c,v 1.4 2014/12/27 16:04:22 kettenis Exp $ */ +/* $OpenBSD: crt0.c,v 1.5 2015/09/01 05:40:06 guenther Exp $ */ /* * Copyright (c) 1995 Christopher G. Demetriou @@ -104,8 +104,11 @@ MD_START(MD_START_ARGS) atexit(cleanup); else #endif - if (__init_tcb != NULL) - __init_tcb(envp); + { + MD_DISABLE_KBIND; + if (__init_tcb != NULL) + __init_tcb(envp); + } #ifdef MCRT0 atexit(_mcleanup); |