logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: ARM crt0.o: Add NULL to end of argv[]: msg#00448

Subject: Re: ARM crt0.o: Add NULL to end of argv[]
> 
> > +   /* Push a NULL argument onto the end of the list.  */
> > +   mov     r2, #0
> > + #ifdef __thumb__
> > +   push    {r2}
> > + #else
> > +   stmfd   sp!, {r1}
> > + #endif
> >   #endif
> 
> That can't be right.  The arm and thumb code push different registers!!!!
> 
> R.
> 

And even if you change that I'm not convinced.  Surely you need to push 
this extra value *before* you reverse the list.  Otherwise the first 
argument will be null, not the last.

R.




<Prev in Thread] Current Thread [Next in Thread>