Hi all,
After some experimenting I came to the conclusion that the minimum app
that won't crash with gcc -static is printf("%.0d", 0); which is
essentially a noop printf. So my patch calls that before calling main.
Looking for feedback on the patch.
Cheers,
Maarten
Index: libc/misc/internals/__uClibc_main.c
===================================================================
--- a/libc/misc/internals/__uClibc_main.c (revision 21727)
+++ b/libc/misc/internals/__uClibc_main.c (working copy)
@@ -393,6 +393,10 @@
if (likely(__h_errno_location!=NULL))
*(__h_errno_location()) = 0;
+#ifndef SHARED
+ printf("%.0d",0);
+#endif
+
/*
* Finally, invoke application's main and then exit.
*/
_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc