From 5c12c8eecd5f2e06c200651e90befe85efcf166f Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 11 Oct 2001 08:29:22 +0000 Subject: Patch from Miles Bader to support the v850. He sent this patch to me a month ago, but I forgot to apply it... --- libc/misc/internals/__uClibc_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libc/misc/internals/__uClibc_main.c') diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index a81448fae..c2996735f 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -26,8 +26,8 @@ void __uClibc_main(int argc, char **argv, char **envp) #ifdef HAVE_ELF weak_alias(__environ, environ); -weak_alias(__uClibc_empty_func, __init_stdio); -weak_alias(__uClibc_empty_func, __stdio_close_all); +weak_symbol(__init_stdio); +weak_symbol(__stdio_close_all); #endif extern void __init_stdio(void); @@ -51,7 +51,8 @@ void __uClibc_main(int argc, char **argv, char **envp) * Initialize stdio here. In the static library case, this will * be bypassed if not needed because of the weak alias above. */ - __init_stdio(); + if (__init_stdio) + __init_stdio(); /* * Note: It is possible that any initialization done above could @@ -74,6 +75,7 @@ void __uClibc_main(int argc, char **argv, char **envp) char **__environ = 0; +#ifndef HAVE_ELF /* * Define an empty function and use it as a weak alias for the stdio * initialization routine. That way we don't pull in all the stdio @@ -87,9 +89,7 @@ void __uClibc_empty_func(void) { } -#ifndef HAVE_ELF weak_alias(__environ, environ); weak_alias(__uClibc_empty_func, __init_stdio); weak_alias(__uClibc_empty_func, __stdio_close_all); #endif - -- cgit v1.2.3