21 lines
313 B
ArmAsm
21 lines
313 B
ArmAsm
|
.section .text
|
||
|
|
||
|
.global _start
|
||
|
.extern exit
|
||
|
_start:
|
||
|
# Set up end of the stack frame linked list.
|
||
|
movq $0, %rbp
|
||
|
pushq %rbp # rip=0
|
||
|
pushq %rbp # rbp=0
|
||
|
movq %rsp, %rbp
|
||
|
|
||
|
# Run the global constructors.
|
||
|
call _init
|
||
|
|
||
|
# Run main
|
||
|
call main
|
||
|
|
||
|
# Terminate the process with the exit code.
|
||
|
movl %eax, %edi
|
||
|
call exit
|