forked from Imagelibrary/rtems
Setup environment pointer for getenv/putenv. Patch from Eric Norum
<eric@cls.usask.ca>.
This commit is contained in:
@@ -396,8 +396,8 @@ ZEROLOOPTEST:
|
|||||||
bcs.s ZEROLOOP | No, skip
|
bcs.s ZEROLOOP | No, skip
|
||||||
|
|
||||||
movel #stack_init,a7 | set master stack pointer
|
movel #stack_init,a7 | set master stack pointer
|
||||||
movel d0,a7@- | environp
|
pea env | envp
|
||||||
movel d0,a7@- | argv
|
pea arg | argv
|
||||||
movel d0,a7@- | argc
|
movel d0,a7@- | argc
|
||||||
jsr SYM(boot_card) | Call C main
|
jsr SYM(boot_card) | Call C main
|
||||||
|
|
||||||
@@ -422,11 +422,16 @@ BEGIN_DATA_DCL
|
|||||||
.align 2
|
.align 2
|
||||||
PUBLIC (environ)
|
PUBLIC (environ)
|
||||||
SYM (environ):
|
SYM (environ):
|
||||||
.long 0
|
.long env
|
||||||
PUBLIC (_M68kSpuriousInterruptCount)
|
PUBLIC (_M68kSpuriousInterruptCount)
|
||||||
SYM (_M68kSpuriousInterruptCount):
|
SYM (_M68kSpuriousInterruptCount):
|
||||||
.long 0
|
.long 0
|
||||||
END_DATA_DCL
|
END_DATA_DCL
|
||||||
|
|
||||||
|
BEGIN_BSS
|
||||||
|
env: .long 0
|
||||||
|
arg: .long 0
|
||||||
|
END_BSS
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|||||||
@@ -396,8 +396,8 @@ ZEROLOOPTEST:
|
|||||||
bcs.s ZEROLOOP | No, skip
|
bcs.s ZEROLOOP | No, skip
|
||||||
|
|
||||||
movel #stack_init,a7 | set master stack pointer
|
movel #stack_init,a7 | set master stack pointer
|
||||||
movel d0,a7@- | environp
|
pea env | envp
|
||||||
movel d0,a7@- | argv
|
pea arg | argv
|
||||||
movel d0,a7@- | argc
|
movel d0,a7@- | argc
|
||||||
jsr SYM(boot_card) | Call C main
|
jsr SYM(boot_card) | Call C main
|
||||||
|
|
||||||
@@ -422,11 +422,16 @@ BEGIN_DATA_DCL
|
|||||||
.align 2
|
.align 2
|
||||||
PUBLIC (environ)
|
PUBLIC (environ)
|
||||||
SYM (environ):
|
SYM (environ):
|
||||||
.long 0
|
.long env
|
||||||
PUBLIC (_M68kSpuriousInterruptCount)
|
PUBLIC (_M68kSpuriousInterruptCount)
|
||||||
SYM (_M68kSpuriousInterruptCount):
|
SYM (_M68kSpuriousInterruptCount):
|
||||||
.long 0
|
.long 0
|
||||||
END_DATA_DCL
|
END_DATA_DCL
|
||||||
|
|
||||||
|
BEGIN_BSS
|
||||||
|
env: .long 0
|
||||||
|
arg: .long 0
|
||||||
|
END_BSS
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user