Re: [PATCH] sh: fix __HAVE_SHARED__ condition in crti.S.

2008-09-05 Thread Takashi Yoshii
I feel I missed a train. Yoshii, are you able to try with older gcc ? ... I built gcc-3.4.6 for testing, but none older than it. ... or was you able to produce \n a testcase ? No. I couldn't find nothing other than CRT_CALL_STATIC_FUNCTIONs between this prologue and epilogue, which is

Re: [PATCH] sh: Fix args for __uClibc_main() in crt1.S

2008-08-07 Thread Takashi Yoshii
Thank you for your review. I've found some of architectures other than SH set a pointer to _dl_fini() to rtld_fini in ldso/ldso/*/dl-startup.h, which apparently SH should have, too. I've add small patch. Though I am really not confidence of correctness This one set the pointer to _dl_init()

Re: [PATCH] sh: Fix args for __uClibc_main() in crt1.S

2008-08-07 Thread Takashi Yoshii
Hi, please find attached another patch to completely fix the sh4 startup sequence (in addition to the patch of Yoshii). Tested. It works fine here. Great. # Sorry for my slow writing(code/mail) made useless traffic. /yoshii ___ uClibc mailing list

Re: [PATCH] sh: Fix args for __uClibc_main() in crt1.S

2008-08-07 Thread Takashi Yoshii
This still requires the kernel zeroing the r4 value before handing control over as per your FLAT_PLAT_INIT() patch, correct? Yes. I think kernel should set(clear) r4 for static object(ELF and FLT). For shared one(currently ELF), dl-start.h(uClibc)/dl-machine.h(glibc) set r4. # Perhaps the real

Re: [PATCH] sh: Fix args for __uClibc_main() in crt1.S

2008-08-07 Thread Takashi Yoshii
Hi, Hum... I think that we are lucky because _dl_fini is defined in ldso.c that includes dl-startup.c that includes dl-startup.h... but if _dl_fini were defined in another compilation units ? does it work ? am I correct ? Well, that strange structure of the source code tells us that this

[PATCH] sh: Fix args for __uClibc_main() in crt1.S

2008-08-06 Thread Takashi Yoshii
Hi, As a comment in libc/sysdeps/linux/sh/crt1.S says /* __uClibc_main (main, argc, argv, init, fini) */ , something wrong here. There should be two more args. 7th arg stack_end seems to be missing. 6th one is not listed, but the original code pushed register r4 here. It is not