diff options
Diffstat (limited to 'sys/rt/boot.c')
-rw-r--r-- | sys/rt/boot.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/rt/boot.c b/sys/rt/boot.c index 320a596..8c6616d 100644 --- a/sys/rt/boot.c +++ b/sys/rt/boot.c @@ -3,7 +3,10 @@ #include <elf.h> /* tell linker to go find */ +int atexit(void (*)(void)); int __libc_start_main(int (*main)(int,char **,char **), int argc, char **argv); + +void rt·clean(void); void rt·guardstack(void); #define NAUX 38 @@ -30,6 +33,7 @@ rt·boot(int (*main)(), int argc, char **argv, void (*init)(), void (*fini)(), v rt·init(env, argv[0]); /* ring libc, anyone home? */ + atexit(rt·clean); __libc_start_main(main, argc, argv); /* no? ok we continue on if there is no libc linked */ |