From 980e77b6a7f5382e205f3866067414e9af617dca Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Sat, 3 Feb 2001 23:08:42 +0000 Subject: Schedule running of __fini in __init, not __start. --- lib/csu/alpha/crt0.c | 5 ++--- lib/csu/common_elf/crtbegin.c | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/csu/alpha/crt0.c b/lib/csu/alpha/crt0.c index 8140ac9f231..ee9c2806504 100644 --- a/lib/csu/alpha/crt0.c +++ b/lib/csu/alpha/crt0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crt0.c,v 1.4 2001/01/25 05:37:20 art Exp $ */ +/* $OpenBSD: crt0.c,v 1.5 2001/02/03 23:08:41 art Exp $ */ /* $NetBSD: crt0.c,v 1.1 1996/09/12 16:59:02 cgd Exp $ */ /* * Copyright (c) 1995 Christopher G. Demetriou @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: crt0.c,v 1.4 2001/01/25 05:37:20 art Exp $"; +static char rcsid[] = "$OpenBSD: crt0.c,v 1.5 2001/02/03 23:08:41 art Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -97,7 +97,6 @@ __start(sp, cleanup, obj) #endif #ifndef ECOFF_COMPAT - atexit(__fini); __init(); #endif /* ECOFF_COMPAT */ diff --git a/lib/csu/common_elf/crtbegin.c b/lib/csu/common_elf/crtbegin.c index 750af70c7b4..cef8f19c171 100644 --- a/lib/csu/common_elf/crtbegin.c +++ b/lib/csu/common_elf/crtbegin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crtbegin.c,v 1.3 2001/02/03 22:59:13 art Exp $ */ +/* $OpenBSD: crtbegin.c,v 1.4 2001/02/03 23:08:41 art Exp $ */ /* $NetBSD: crtbegin.c,v 1.1 1996/09/12 16:59:03 cgd Exp $ */ /* @@ -92,6 +92,7 @@ __init() __ctors(); } + atexit(__fini); } extern void __fini(void) __attribute__((section(".fini"))); -- cgit v1.2.3