libc: runtime: add more required runtime objects
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
.code64
|
||||||
|
|
||||||
|
.global _start
|
||||||
|
.type _start, @function
|
||||||
|
|
||||||
|
.extern __libc_init
|
||||||
|
.type __libc_init, @function
|
||||||
|
|
||||||
|
_start:
|
||||||
|
# %rdi: (struct rosetta_bootstrap *)bs_info
|
||||||
|
mov %rdi, %rbx
|
||||||
|
call __libc_init
|
||||||
|
|
||||||
|
mov 0(%rbx), %rdi # argc
|
||||||
|
mov 8(%rbx), %rsi # argv
|
||||||
|
mov 24(%rbx), %rdx # envp
|
||||||
|
call main
|
||||||
|
|
||||||
|
mov %rax, %rdi
|
||||||
|
mov $9, %rax
|
||||||
|
syscall
|
||||||
|
1: jmp 1b
|
||||||
@@ -1,24 +1 @@
|
|||||||
.code64
|
.code64
|
||||||
|
|
||||||
.global _start
|
|
||||||
.type _start, @function
|
|
||||||
|
|
||||||
.extern __libc_init
|
|
||||||
.type __libc_init, @function
|
|
||||||
|
|
||||||
.extern task_exit
|
|
||||||
.type task_exit, @function
|
|
||||||
|
|
||||||
_start:
|
|
||||||
# %rdi: (struct rosetta_bootstrap *)bs_info
|
|
||||||
mov %rdi, %rbx
|
|
||||||
call __libc_init
|
|
||||||
|
|
||||||
mov 0(%rbx), %rdi # argc
|
|
||||||
mov 8(%rbx), %rsi # argv
|
|
||||||
mov 24(%rbx), %rdx # envp
|
|
||||||
call main
|
|
||||||
|
|
||||||
mov %rax, %rdi
|
|
||||||
call task_exit
|
|
||||||
1: jmp 1b
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
.code64
|
||||||
|
|
||||||
|
.global _start
|
||||||
|
.type _start, @function
|
||||||
|
|
||||||
|
.extern __libc_init
|
||||||
|
.type __libc_init, @function
|
||||||
|
|
||||||
|
_start:
|
||||||
|
# %rdi: (struct rosetta_bootstrap *)bs_info
|
||||||
|
mov %rdi, %rbx
|
||||||
|
call __libc_init
|
||||||
|
|
||||||
|
mov 0(%rbx), %rdi # argc
|
||||||
|
mov 8(%rbx), %rsi # argv
|
||||||
|
mov 24(%rbx), %rdx # envp
|
||||||
|
call main
|
||||||
|
|
||||||
|
mov %rax, %rdi
|
||||||
|
mov $9, %rax
|
||||||
|
syscall
|
||||||
|
1: jmp 1b
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
.code64
|
||||||
|
|
||||||
|
.global _crtbeginS
|
||||||
|
.type _crtbeginS, @function
|
||||||
|
|
||||||
|
_crtbeginS:
|
||||||
|
ret
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
.code64
|
||||||
|
|
||||||
|
.global _crtendS
|
||||||
|
.type _crtendS, @function
|
||||||
|
|
||||||
|
_crtendS:
|
||||||
|
ret
|
||||||
Reference in New Issue
Block a user