busybox segfault in __uClibc_main

Joakim Tjernlund joakim.tjernlund at transmode.se
Fri Dec 9 23:41:47 UTC 2005


 
> 
> Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:
> 
> >>
> >> Would you mind changing that to:
> >> if(r7 == _start)
> >> r7 = 0;
> >> and send a patch(add a comment too)? I suspect that it 
> will take time 
> >> to change the kernel, if at all.
> >
> > I just realized that this won't work in the long run. Either linux 
> > changes r7 to zero or r7 will contain a semi ramdom value, it may 
> > change as linux moves forward.
> 
> But YOU do have a choice right? because your WROTE ldso. you 
> can CHANGE ldso to notify the app that's it's dynamicly linked.

Well, I didn't write ld.so, but I have been mantaining it since some time after .96.
Yes I do have a choice, but I won't impl. the whole ugly glibc startup procedure, but
probably lend the general idea from it. Depends on what the kernel folks at
linuxppc-dev has to say.

Curious, does replacing r7 with r9 in
	lwz	r7,_NIP(r1)
 	lwz	r8,_MSR(r1)
 	FIX_SRR1(r8, r0)
 	lwz	r2,GPR2(r1)
	lwz	r1,GPR1(r1)
	mtspr	SPRN_SRR0,r7
	mtspr	SPRN_SRR1,r8
	SYNC
	RFI
work for you?




More information about the uClibc mailing list