@@ -320,7 +320,9 @@ extern void (*__rtld_fini)(void);
/*
* Normal program termination
*/
-void exit(int rv)
+#undef exit
+#undef __exit
+void attribute_hidden __exit(int rv)
{
/* Perform exit-specific cleanup (atexit and on_exit) */
LOCK;
@@ -343,6 +345,7 @@ void exit(int rv)
if (_stdio_term)
_stdio_term();
- _exit(rv);
+ _exit_internal(rv);
}
+strong_alias(__exit,exit)
#endif
@@ -32,10 +32,12 @@
static inline _syscall1(void, __syscall_exit, int, status);
-void attribute_noreturn _exit(int status)
+#undef _exit
+#undef _exit_internal
+void attribute_noreturn _exit_internal(int status)
/* The loop is added only to keep gcc happy. */
while(1)
INLINE_SYSCALL(exit, 1, status);
-
+strong_alias(_exit_internal,_exit)