Skip to content
Snippets Groups Projects
Commit c1b20cde authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Add x86 _start

parent 61924502
No related branches found
No related tags found
No related merge requests found
Pipeline #10502 failed
...@@ -5,6 +5,33 @@ ...@@ -5,6 +5,33 @@
use core::arch::global_asm; 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")] #[cfg(target_arch = "x86_64")]
global_asm!(" global_asm!("
.globl _start .globl _start
...@@ -25,13 +52,6 @@ _start: ...@@ -25,13 +52,6 @@ _start:
call relibc_start call relibc_start
.size _start, . - _start .size _start, . - _start
"); ");
#[cfg(target_arch = "aarch64")]
global_asm!("
.globl _start
_start:
mov x0, sp
bl relibc_start
");
#[linkage = "weak"] #[linkage = "weak"]
#[no_mangle] #[no_mangle]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment