argv dereference in crt1.S for m68k

Richard Sandiford richard at
Thu Nov 16 20:53:07 UTC 2006

Rick Garcia <rick at> writes:
> I'm looking at the CVS version of uClibc/libc/sysdeps/linux/m68k/crt1.S 
> for all this.
> ...working on a m68knommu system :
> I noticed this with static binaries (no shared libs) - on 2.4.31 
> uClinux.  When I execute an app, the stack looks like this upon hitting 
> _start :
> %sp : argc
> %sp(4) : argv[0]
> ...
> %sp(argc): null
> %sp(argc+1): environ

Have you made any local changes to uClinux?  I've never used 2.4.31, but
on 2.6.12-uc0 (the version we use), %sp(4) does indeed contain %argv,
as crt1.S expects.  The macro that controls this behaviour is
flat_argvp_envp_on_stack(), which is defined to 1 for m68k in the
CVS 2.4 sources:;content-type=text%2Fplain


More information about the uClibc mailing list