summaryrefslogtreecommitdiff
path: root/libc/misc/internals/__uClibc_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/internals/__uClibc_main.c')
-rw-r--r--libc/misc/internals/__uClibc_main.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index a33e6fe4a..70dc07328 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -32,7 +32,6 @@ extern void __guard_setup(void);
/*
* Prototypes.
*/
-extern int main(int argc, char **argv, char **envp);
extern void weak_function _stdio_init(void);
extern int *weak_const_function __errno_location(void);
extern int *weak_const_function __h_errno_location(void);
@@ -166,7 +165,9 @@ void attribute_hidden (*__rtld_fini)(void) = NULL;
*/
void __attribute__ ((__noreturn__))
__uClibc_start_main(int argc, char **argv, char **envp,
- void (*app_init)(void), void (*app_fini)(void), void (*rtld_fini)(void))
+ void (*app_init)(void), void (*app_fini)(void),
+ int (*main)(int argc, char **argv, char **envp),
+ void (*rtld_fini)(void))
{
#ifdef __ARCH_HAS_MMU__
unsigned long *aux_dat;
@@ -249,21 +250,3 @@ __uClibc_start_main(int argc, char **argv, char **envp,
*/
exit(main(argc, argv, envp));
}
-
-
-/* __uClibc_main is the old main stub of the uClibc. This
- * function is called from crt0 (uClibc 0.9.15 and older) after
- * ALL shared libraries are initialized, and just before we call
- * the application's main() function.
- *
- * Attention: This stub does not call the .init/.fini sections of
- * the application. If you need this, please fix your uClibc port
- * so that __uClibc_start_main is called by your crt0.S with
- * _init and _fini properly set.
-*/
-void __attribute__ ((__noreturn__))
-__uClibc_main(int argc, char **argv, char ** envp)
-{
- __uClibc_start_main(argc, argv, envp, NULL, NULL, NULL);
-}
-