diff options
author | svn2git <svn2git@FreeBSD.org> | 1994-07-01 08:00:00 +0000 |
---|---|---|
committer | svn2git <svn2git@FreeBSD.org> | 1994-07-01 08:00:00 +0000 |
commit | 5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 (patch) | |
tree | e779b5a6edddbb949b7990751b12d6f25304ba86 /lib/csu.i386/crt1.c | |
parent | a16f65c7d117419bd266c28a1901ef129a337569 (diff) |
Diffstat (limited to 'lib/csu.i386/crt1.c')
-rw-r--r-- | lib/csu.i386/crt1.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/lib/csu.i386/crt1.c b/lib/csu.i386/crt1.c deleted file mode 100644 index bee2d1b6fb67..000000000000 --- a/lib/csu.i386/crt1.c +++ /dev/null @@ -1,47 +0,0 @@ -typedef void (*func_ptr) (void); - -func_ptr __CTOR_LIST__[2]; -func_ptr __DTOR_LIST__[2]; - -/* Run all the global destructors on exit from the program. */ - -static void -__do_global_dtors () -{ - unsigned nptrs = (unsigned long) __DTOR_LIST__[0]; - unsigned i; - - /* Some systems place the number of pointers - in the first word of the table. - On other systems, that word is -1. - In all cases, the table is null-terminated. */ - - /* If the length is not recorded, count up to the null. */ - if (nptrs == -1) - for (nptrs = 0; __DTOR_LIST__[nptrs + 1] != 0; nptrs++); - - /* GNU LD format. */ - for (i = nptrs; i >= 1; i--) - __DTOR_LIST__[i] (); - -} - -static void -__do_global_ctors () -{ - func_ptr *p; - - for (p = __CTOR_LIST__ + 1; *p; ) - (*p++)(); - atexit (__do_global_dtors); -} - -__init() -{ - static int initialized = 0; - if (! initialized) { - initialized = 1; - __do_global_ctors (); - } - -} |