mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Set up initial stack frame as zero pointer.
This allows call traces to know when they are done.
This commit is contained in:
parent
27fda0c0eb
commit
9411784b58
2 changed files with 12 additions and 0 deletions
|
@ -34,6 +34,12 @@
|
||||||
.global _start
|
.global _start
|
||||||
.type _start, @function
|
.type _start, @function
|
||||||
_start:
|
_start:
|
||||||
|
# Set up end of the stack frame linked list.
|
||||||
|
xorl %ebp, %ebp
|
||||||
|
pushq %rbp # rip=0
|
||||||
|
pushq %rbp # rbp=0
|
||||||
|
movq %rsp, %rbp
|
||||||
|
|
||||||
movq %rcx, environ # envp
|
movq %rcx, environ # envp
|
||||||
|
|
||||||
# Prepare signals, memory allocation, stdio and such.
|
# Prepare signals, memory allocation, stdio and such.
|
||||||
|
|
|
@ -34,6 +34,12 @@
|
||||||
.global _start
|
.global _start
|
||||||
.type _start, @function
|
.type _start, @function
|
||||||
_start:
|
_start:
|
||||||
|
# Set up end of the stack frame linked list.
|
||||||
|
xorl %ebp, %ebp
|
||||||
|
pushl %ebp # rip=0
|
||||||
|
pushl %ebp # rbp=0
|
||||||
|
movl %esp, %ebp
|
||||||
|
|
||||||
movl %ecx, environ # envp
|
movl %ecx, environ # envp
|
||||||
|
|
||||||
# Arguments for main
|
# Arguments for main
|
||||||
|
|
Loading…
Reference in a new issue