From f99a409614d6c4522947819dc74a336ee3815b6c Mon Sep 17 00:00:00 2001 From: guenther <> Date: Sun, 25 Oct 2015 18:01:24 +0000 Subject: 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@ --- src/lib/libc/stdlib/atexit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib/libc/stdlib/atexit.c') 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 @@ -/* $OpenBSD: atexit.c,v 1.21 2015/04/07 01:27:07 guenther Exp $ */ +/* $OpenBSD: atexit.c,v 1.22 2015/10/25 18:01:24 guenther Exp $ */ /* * Copyright (c) 2002 Daniel Hartmeier * All rights reserved. @@ -103,6 +103,7 @@ unlock: _ATEXIT_UNLOCK(); return (ret); } +DEF_STRONG(__cxa_atexit); /* * Call all handlers registered with __cxa_atexit() for the shared @@ -180,6 +181,7 @@ restart: } } +DEF_STRONG(__cxa_finalize); /* * Register the cleanup function -- cgit v1.2.3-55-g6feb