summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-06-12 21:45:10 +0000
committerEric Andersen <andersen@codepoet.org>2001-06-12 21:45:10 +0000
commit92773db48eb6be7bc3ef12f44e4b163a7f5e0af3 (patch)
tree7a5097716ad65c0899d917a25379131e26a7e47b /libc/misc
parent23f586ed1edb81cea7c976eb1f2354ab24294908 (diff)
Cleanup the toploevel makefile handing of shared libs. Add weak_alias
define, and set things up so nasty old coff toolchains can now compile things and should actually work again. -Erik
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/internals/__uClibc_main.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index 26c028015..dc8c62f97 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -36,6 +36,13 @@ void __uClibc_empty_func(void)
{
}
+#ifdef HAVE_ELF
+weak_alias(__environ, environ);
+weak_alias(__uClibc_empty_func, __init_stdio);
+weak_alias(__uClibc_empty_func, __stdio_close_all);
+#endif
+
+
extern void __init_stdio(void);
extern void __stdio_close_all(void);
@@ -80,7 +87,9 @@ void __uClibc_main(int argc, char **argv, char **envp)
char **__environ = 0;
-__asm__(".weak environ;environ = __environ");
-__asm__(".weak __init_stdio; __init_stdio = __uClibc_empty_func");
-__asm__(".weak __stdio_close_all; __stdio_close_all = __uClibc_empty_func");
+#ifndef HAVE_ELF
+weak_alias(__environ, environ);
+weak_alias(__uClibc_empty_func, __init_stdio);
+weak_alias(__uClibc_empty_func, __stdio_close_all);
+#endif