busybox segfault in __uClibc_main

Joakim Tjernlund joakim.tjernlund at transmode.se
Sun Dec 11 22:35:47 UTC 2005


 
> 
> On Sun, 11 Dec 2005, Joakim Tjernlund wrote:
> 
> >  >
> > > Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:
> > > >
> > > > 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?
> > > 
> > > I'm at home atm, but I'm damned sure it would work.
> > 
> > hmm, one could also fix it in __uClibc_main() by addin 
> #ifdef SHARED 
> > .. #endif, not tested
> > 
> > #ifdef SHARED
> >   __rtld_fini = rtld_fini;
> > #endif
> > 
> > will probably only work on current svn, not on .28
> 
> can this somehow be checked on other arch as well?

Don't quite understand, the above code covers all archs. What else
needs to be checked?

> I am sure that __uClibc_main "offers" more places that can be guarded w/ SHARED

Well, one could eliminate __rtld_fini completely.

Can't rember now, are there 2 versions of crt1, one for shared and one for static that
lives side by side? if so one can force rtld_fini to zero in the static one.

 Jocke

> 
> Peter




More information about the uClibc mailing list