Rename initialization and termination functions from __init() and
__fini() to _init() and _fini(). The linker sets the DT_INIT and DT_FINI .dynamic section entries based on the latter names.
This commit is contained in:
parent
a1c2154bd6
commit
6351dbac24
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: crt0.c,v 1.12 1998/02/03 20:01:34 perry Exp $ */
|
||||
/* $NetBSD: crt0.c,v 1.13 1998/03/27 09:11:33 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Christopher G. Demetriou
|
||||
@ -71,8 +71,8 @@ char *__progname = "";
|
||||
struct ps_strings *__ps_strings = 0;
|
||||
|
||||
#ifndef ECOFF_COMPAT
|
||||
extern void __init __P((void));
|
||||
extern void __fini __P((void));
|
||||
extern void _init __P((void));
|
||||
extern void _fini __P((void));
|
||||
#endif /* ECOFF_COMPAT */
|
||||
|
||||
#ifdef DYNAMIC
|
||||
@ -136,8 +136,8 @@ __start(sp, cleanup, obj, ps_strings)
|
||||
#endif
|
||||
|
||||
#ifndef ECOFF_COMPAT
|
||||
atexit(__fini);
|
||||
__init();
|
||||
atexit(_fini);
|
||||
_init();
|
||||
#endif /* ECOFF_COMPAT */
|
||||
|
||||
exit(main(argc, argv, environ));
|
||||
@ -147,7 +147,7 @@ __start(sp, cleanup, obj, ps_strings)
|
||||
* NOTE: Leave the RCS ID _after_ __start(), in case it gets placed in .text.
|
||||
*/
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: crt0.c,v 1.12 1998/02/03 20:01:34 perry Exp $");
|
||||
__RCSID("$NetBSD: crt0.c,v 1.13 1998/03/27 09:11:33 jtc Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
static char *
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: crtbegin.c,v 1.2 1997/03/21 05:47:28 cgd Exp $ */
|
||||
/* $NetBSD: crtbegin.c,v 1.3 1998/03/27 09:11:33 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Paul Kranenburg
|
||||
@ -87,10 +87,10 @@ __ctors()
|
||||
(**p++)();
|
||||
}
|
||||
|
||||
extern void __init(void) __attribute__((section(".init")));
|
||||
extern void _init(void) __attribute__((section(".init")));
|
||||
|
||||
void
|
||||
__init()
|
||||
_init()
|
||||
{
|
||||
static int initialized = 0;
|
||||
|
||||
@ -105,10 +105,10 @@ __init()
|
||||
|
||||
}
|
||||
|
||||
extern void __fini(void) __attribute__((section(".fini")));
|
||||
extern void _fini(void) __attribute__((section(".fini")));
|
||||
|
||||
void
|
||||
__fini()
|
||||
_fini()
|
||||
{
|
||||
/*
|
||||
* Call global destructors.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: crtbegin.c,v 1.2 1997/03/21 05:47:28 cgd Exp $ */
|
||||
/* $NetBSD: crtbegin.c,v 1.3 1998/03/27 09:11:33 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Paul Kranenburg
|
||||
@ -87,10 +87,10 @@ __ctors()
|
||||
(**p++)();
|
||||
}
|
||||
|
||||
extern void __init(void) __attribute__((section(".init")));
|
||||
extern void _init(void) __attribute__((section(".init")));
|
||||
|
||||
void
|
||||
__init()
|
||||
_init()
|
||||
{
|
||||
static int initialized = 0;
|
||||
|
||||
@ -105,10 +105,10 @@ __init()
|
||||
|
||||
}
|
||||
|
||||
extern void __fini(void) __attribute__((section(".fini")));
|
||||
extern void _fini(void) __attribute__((section(".fini")));
|
||||
|
||||
void
|
||||
__fini()
|
||||
_fini()
|
||||
{
|
||||
/*
|
||||
* Call global destructors.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: crt0.c,v 1.7 1998/02/03 20:01:41 perry Exp $ */
|
||||
/* $NetBSD: crt0.c,v 1.8 1998/03/27 09:11:33 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Christopher G. Demetriou
|
||||
@ -73,8 +73,8 @@ char *__progname = "";
|
||||
struct ps_strings *__ps_strings = 0;
|
||||
|
||||
#ifndef ECOFF_COMPAT
|
||||
extern void __init __P((void));
|
||||
extern void __fini __P((void));
|
||||
extern void _init __P((void));
|
||||
extern void _fini __P((void));
|
||||
#endif /* ECOFF_COMPAT */
|
||||
|
||||
#ifdef DYNAMIC
|
||||
@ -138,8 +138,8 @@ _start(argc, argv, envp, obj, cleanup, ps_strings)
|
||||
#endif
|
||||
|
||||
#ifndef ECOFF_COMPAT
|
||||
atexit(__fini);
|
||||
__init();
|
||||
atexit(_fini);
|
||||
_init();
|
||||
#endif /* ECOFF_COMPAT */
|
||||
|
||||
exit(main(argc, argv, environ));
|
||||
@ -149,7 +149,7 @@ _start(argc, argv, envp, obj, cleanup, ps_strings)
|
||||
* NOTE: Leave the RCS ID _after_ __start(), in case it gets placed in .text.
|
||||
*/
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: crt0.c,v 1.7 1998/02/03 20:01:41 perry Exp $");
|
||||
__RCSID("$NetBSD: crt0.c,v 1.8 1998/03/27 09:11:33 jtc Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
static char *
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: crtbegin.c,v 1.2 1997/04/16 20:53:15 thorpej Exp $ */
|
||||
/* $NetBSD: crtbegin.c,v 1.3 1998/03/27 09:11:33 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Paul Kranenburg
|
||||
@ -85,10 +85,10 @@ __ctors()
|
||||
(**p++)();
|
||||
}
|
||||
|
||||
extern void __init(void) __attribute__((section(".init")));
|
||||
extern void _init(void) __attribute__((section(".init")));
|
||||
|
||||
void
|
||||
__init()
|
||||
_init()
|
||||
{
|
||||
static int initialized = 0;
|
||||
|
||||
@ -103,10 +103,10 @@ __init()
|
||||
|
||||
}
|
||||
|
||||
extern void __fini(void) __attribute__((section(".fini")));
|
||||
extern void _fini(void) __attribute__((section(".fini")));
|
||||
|
||||
void
|
||||
__fini()
|
||||
_fini()
|
||||
{
|
||||
/*
|
||||
* Call global destructors.
|
||||
|
Loading…
Reference in New Issue
Block a user