diff options
| author | guenther <> | 2015-10-25 18:01:24 +0000 | 
|---|---|---|
| committer | guenther <> | 2015-10-25 18:01:24 +0000 | 
| commit | d26dd1386187b2be08c82b67e3a2199a67c82900 (patch) | |
| tree | d693093c1d02f4d871efc5d2a1f844d4efa6f765 /src/lib/libc/stdlib/atexit.c | |
| parent | fa8b89b99dd0b9e5ae639623c7a1078d667bf0ce (diff) | |
| download | openbsd-d26dd1386187b2be08c82b67e3a2199a67c82900.tar.gz openbsd-d26dd1386187b2be08c82b67e3a2199a67c82900.tar.bz2 openbsd-d26dd1386187b2be08c82b67e3a2199a67c82900.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 '')
| -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 | 
