rtl/linux/m68k/prt0.as:

correctly calculate and pass on the addresses for the parameters and the environment; this way parameters can now be used, but reading environment variables still does not seem to work...

Note: the other assembler files (especially cprt0.as) were not adjusted and might not work at all

git-svn-id: trunk@22936 -
This commit is contained in:
svenbarth 2012-11-05 21:12:09 +00:00
parent 35f1339404
commit fdf6b17421

View File

@ -43,15 +43,20 @@ _start:
the outermost frame obviously. */
sub.l %fp, %fp
/* Extract the arguments as encoded on the stack and set up the
arguments for `main': argc, argv. envp will be determined
later in __libc_start_main. */
move.l 8(%sp), %d0
move.l %d0, operatingsystem_parameter_envp
move.l 4(%sp), %d0
move.l %d0, operatingsystem_parameter_argv
/* Extract the arguments as encoded on the stack. */
move.l (%sp), %d0
move.l %d0, operatingsystem_parameter_argc
lea.l 4(%sp), %a0
move.l %a0, operatingsystem_parameter_argv
lea.l 4(%sp,%d0.l*4), %a0
move.l %a0, operatingsystem_parameter_envp
# move.l 8(%sp), %d0
# move.l %d0, operatingsystem_parameter_envp
# move.l 4(%sp), %d0
# move.l %d0, operatingsystem_parameter_argv
# move.l (%sp), %d0
# move.l %d0, operatingsystem_parameter_argc
jbsr PASCALMAIN