RFC: [PATCH] Make -static builds work again without crashing
Carmelo Amoroso
carmelo73 at gmail.com
Sat Apr 19 19:18:09 UTC 2008
Maarten Lankhorst wrote:
> 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.
> */
>
???
what kind of fix is it ???
Obviously this will be never added !!!
I suggest to start debugging to see where it craches,
and if you can, provide a real patch.
Anyway, I did not experience problem with uclibc-nptl branch
on sh4 when statically linked.
Regards,
Carmelo
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://busybox.net/cgi-bin/mailman/listinfo/uclibc
More information about the uClibc
mailing list