Skip to content

Commit

Permalink
feat: add sys_image_start_address
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening authored and stlankes committed Jul 22, 2024
1 parent 88ad11b commit a011b97
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,12 @@ extern "C" fn __sys_dup(fd: i32) -> i32 {
pub extern "C" fn sys_dup(fd: i32) -> i32 {
kernel_function!(__sys_dup(fd))
}

extern "C" fn __sys_image_start_addr() -> usize {
crate::mm::kernel_start_address().0.try_into().unwrap()
}

#[no_mangle]
pub extern "C" fn sys_image_start_addr() -> usize {
kernel_function!(__sys_image_start_addr())
}

0 comments on commit a011b97

Please sign in to comment.