argv dereference in crt1.S for m68k

Rick Garcia rick at
Fri Nov 17 16:38:20 UTC 2006

Richard Sandiford wrote:
> David McCullough <david_mccullough at> writes:
>> Jivin Richard Sandiford lays it down ...
>>> 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:
>> The last time I checked,  2.4 and 2.6 were identical (in this respect ;-)
>> But that was a while ago,  they both still set flat_argvp_envp_on_stack() to
>> be (1).
> OK, thanks.  (Rick: looking back, my message wasn't very clear, so in
> case there's any doubt: a value of (1) selects the behaviour crt1.S expects,
> while a value of (0) selects the behaviour you described.)

'got it.  I'm apparently working on an older CVS drop - my version still 
has crt0.S instead of crt1.S, but the issue is the same either way, and 
it works as long as the uClibc and uClinux stacks are in sync.

I'm a bit iffy on the %a1 termination function pointer tho - I still 
don't see that as a mmu/nommu issue.  Is that simply something that's 
being deprecated as uClinux moves on?

  - Rick Garcia
  Live Oak Logic

More information about the uClibc mailing list