diff options
author | guenther <> | 2015-10-25 18:01:24 +0000 |
---|---|---|
committer | guenther <> | 2015-10-25 18:01:24 +0000 |
commit | f99a409614d6c4522947819dc74a336ee3815b6c (patch) | |
tree | d693093c1d02f4d871efc5d2a1f844d4efa6f765 /src/lib/libc/stdlib/atexit.c | |
parent | 42fee343ee2dc57b8df51e274a7981adeaa05c85 (diff) | |
download | openbsd-f99a409614d6c4522947819dc74a336ee3815b6c.tar.gz openbsd-f99a409614d6c4522947819dc74a336ee3815b6c.tar.bz2 openbsd-f99a409614d6c4522947819dc74a336ee3815b6c.zip |
Hide __atexit and __atexit_register_cleanup()
Wrap __cxa_{atexit,finalize}() so the call from exit() goes direct
Switch regress/lib/libc/atexit/ to be built with -static so that it can
still access __atexit*
ok millert@ jca@
Diffstat (limited to 'src/lib/libc/stdlib/atexit.c')
-rw-r--r-- | src/lib/libc/stdlib/atexit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/atexit.c b/src/lib/libc/stdlib/atexit.c index a33080571f..4ccf84562c 100644 --- a/src/lib/libc/stdlib/atexit.c +++ b/src/lib/libc/stdlib/atexit.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: atexit.c,v 1.21 2015/04/07 01:27:07 guenther Exp $ */ | 1 | /* $OpenBSD: atexit.c,v 1.22 2015/10/25 18:01:24 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2002 Daniel Hartmeier | 3 | * Copyright (c) 2002 Daniel Hartmeier |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -103,6 +103,7 @@ unlock: | |||
103 | _ATEXIT_UNLOCK(); | 103 | _ATEXIT_UNLOCK(); |
104 | return (ret); | 104 | return (ret); |
105 | } | 105 | } |
106 | DEF_STRONG(__cxa_atexit); | ||
106 | 107 | ||
107 | /* | 108 | /* |
108 | * Call all handlers registered with __cxa_atexit() for the shared | 109 | * Call all handlers registered with __cxa_atexit() for the shared |
@@ -180,6 +181,7 @@ restart: | |||
180 | 181 | ||
181 | } | 182 | } |
182 | } | 183 | } |
184 | DEF_STRONG(__cxa_finalize); | ||
183 | 185 | ||
184 | /* | 186 | /* |
185 | * Register the cleanup function | 187 | * Register the cleanup function |