summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/exit.c
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2011-03-07 05:09:09 +0000
committerjoerg <joerg@NetBSD.org>2011-03-07 05:09:09 +0000
commit399a2aeae2f69e5a801f3ec68d7940fbb3c927da (patch)
tree87ff9ee6c2d69429a347fb320fab4b5e66c67be8 /lib/libc/stdlib/exit.c
parent4e55c905d89fe081f1657db1de73dc3d8089caa4 (diff)
Pass down ELF Auxillary Vectors for static NetBSD binaries too.
Rename __libc_init to _libc_init and call it explicitly from CSU code. This enforces the constructor run order for newly linked programs. Keep it as constructor with run-once semantic for binary compatibility. Implement dl_iterate_phdr for statically linked programs. This material is based upon work partially supported by The NetBSD Foundation under a contract with Joerg Sonnenberger.
Diffstat (limited to 'lib/libc/stdlib/exit.c')
-rw-r--r--lib/libc/stdlib/exit.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/libc/stdlib/exit.c b/lib/libc/stdlib/exit.c
index c5bcd672596..d2ab2f6f345 100644
--- a/lib/libc/stdlib/exit.c
+++ b/lib/libc/stdlib/exit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: exit.c,v 1.13 2010/09/09 10:19:31 skrll Exp $ */
+/* $NetBSD: exit.c,v 1.14 2011/03/07 05:09:12 joerg Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)exit.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: exit.c,v 1.13 2010/09/09 10:19:31 skrll Exp $");
+__RCSID("$NetBSD: exit.c,v 1.14 2011/03/07 05:09:12 joerg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -45,13 +45,6 @@ __RCSID("$NetBSD: exit.c,v 1.13 2010/09/09 10:19:31 skrll Exp $");
#include "atexit.h"
#endif
-#ifdef _LIBC
-extern void __libc_init(void);
-#ifndef __lint
-static void (*force_ref)(void) __used = __libc_init;
-#endif
-#endif
-
void (*__cleanup) __P((void));
/*