pte clone for aarch64
This commit is contained in:
@@ -10,6 +10,7 @@ _start:
|
||||
mov x0, sp
|
||||
bl relibc_ld_so_start
|
||||
# TODO: aarch64
|
||||
udf #0
|
||||
");
|
||||
|
||||
#[cfg(target_arch = "x86")]
|
||||
|
||||
+17
-19
@@ -67,24 +67,32 @@ pub unsafe fn pte_clone_impl(stack: *mut usize) -> Result<usize> {
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
//TODO: aarch64
|
||||
extern "C" {
|
||||
fn __relibc_internal_pte_clone_ret();
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
core::arch::global_asm!("
|
||||
.globl __relibc_internal_pte_clone_ret
|
||||
.type __relibc_internal_pte_clone_ret, @function
|
||||
.p2align 6
|
||||
__relibc_internal_pte_clone_ret:
|
||||
b __relibc_internal_pte_clone_ret
|
||||
# Load registers
|
||||
ldr x8, [sp], #8
|
||||
ldr x0, [sp], #8
|
||||
ldr x1, [sp], #8
|
||||
ldr x2, [sp], #8
|
||||
ldr x3, [sp], #8
|
||||
ldr x4, [sp], #8
|
||||
ldr x5, [sp], #8
|
||||
|
||||
# Call entry point
|
||||
blr x8
|
||||
|
||||
ret
|
||||
.size __relibc_internal_pte_clone_ret, . - __relibc_internal_pte_clone_ret
|
||||
");
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
extern "C" {
|
||||
fn __relibc_internal_pte_clone_ret();
|
||||
}
|
||||
|
||||
//TODO: x86
|
||||
#[cfg(target_arch = "x86")]
|
||||
core::arch::global_asm!("
|
||||
.globl __relibc_internal_pte_clone_ret
|
||||
@@ -110,11 +118,6 @@ __relibc_internal_pte_clone_ret:
|
||||
.size __relibc_internal_pte_clone_ret, . - __relibc_internal_pte_clone_ret
|
||||
");
|
||||
|
||||
#[cfg(target_arch = "x86")]
|
||||
extern "cdecl" {
|
||||
fn __relibc_internal_pte_clone_ret();
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
core::arch::global_asm!("
|
||||
.globl __relibc_internal_pte_clone_ret
|
||||
@@ -144,9 +147,4 @@ __relibc_internal_pte_clone_ret:
|
||||
|
||||
ret
|
||||
.size __relibc_internal_pte_clone_ret, . - __relibc_internal_pte_clone_ret
|
||||
");
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
extern "sysv64" {
|
||||
fn __relibc_internal_pte_clone_ret();
|
||||
}
|
||||
");
|
||||
Reference in New Issue
Block a user