Add x86 _start
This commit is contained in:
+27
-7
@@ -5,6 +5,33 @@
|
||||
|
||||
use core::arch::global_asm;
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
global_asm!("
|
||||
.globl _start
|
||||
_start:
|
||||
mov x0, sp
|
||||
bl relibc_start
|
||||
");
|
||||
|
||||
#[cfg(target_arch = "x86")]
|
||||
global_asm!("
|
||||
.globl _start
|
||||
.type _start, @function
|
||||
_start:
|
||||
sub esp, 8
|
||||
|
||||
mov DWORD PTR [esp], 0x00001F80
|
||||
# ldmxcsr [esp]
|
||||
mov WORD PTR [esp], 0x031F
|
||||
fldcw [esp]
|
||||
|
||||
add esp, 8
|
||||
|
||||
push esp
|
||||
call relibc_start
|
||||
.size _start, . - _start
|
||||
");
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
global_asm!("
|
||||
.globl _start
|
||||
@@ -25,13 +52,6 @@ _start:
|
||||
call relibc_start
|
||||
.size _start, . - _start
|
||||
");
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
global_asm!("
|
||||
.globl _start
|
||||
_start:
|
||||
mov x0, sp
|
||||
bl relibc_start
|
||||
");
|
||||
|
||||
#[linkage = "weak"]
|
||||
#[no_mangle]
|
||||
|
||||
Reference in New Issue
Block a user