diff --git a/src/ld_so/linker.rs b/src/ld_so/linker.rs
index 4aea9b41008ff5fb893746e1a01129d750861a42..503fe1b7e38259afb6e4ef7d9aa6c16e35254395 100644
--- a/src/ld_so/linker.rs
+++ b/src/ld_so/linker.rs
@@ -29,6 +29,7 @@ use super::{
     debug::{RTLDDebug, RTLDState, _dl_debug_state, _r_debug},
     tcb::{Master, Tcb},
     PAGE_SIZE,
+    access,
 };
 
 #[cfg(target_os = "redox")]
@@ -169,7 +170,9 @@ impl Linker {
                     })?;
 
                     // TODO: Use R_OK | X_OK
-                    unistd::access(path_c.as_ptr(), unistd::F_OK) == 0
+                    // We cannot use unix stdlib because errno is thead local variable
+                    // and fs:[0] is not set yet.
+                    access(path_c.as_ptr(), unistd::F_OK) == 0
                 };
 
                 if access {
diff --git a/src/ld_so/mod.rs b/src/ld_so/mod.rs
index 1d06541ac15dfc6fcbeaac4a7498d1e503fb0486..46a7a271a97252ca69c3c81dea51202e080888cc 100644
--- a/src/ld_so/mod.rs
+++ b/src/ld_so/mod.rs
@@ -1,8 +1,11 @@
 use goblin::elf::program_header::{self, program_header32, program_header64, ProgramHeader};
 
 use self::tcb::{Master, Tcb};
-use crate::start::Stack;
-
+use crate::{
+start::Stack,
+c_str::CStr,
+platform::types::*
+};
 pub const PAGE_SIZE: usize = 4096;
 
 pub mod debug;
@@ -80,6 +83,12 @@ pub fn static_init(sp: &'static Stack) {
     }
 }
 
+// Wrapper over the systemcall, Do not use outside of ld_so
+pub unsafe fn access(path: *const c_char, mode: c_int) -> c_int {
+        let path = CStr::from_ptr(path);
+        syscall!(ACCESS, (path).as_ptr(), mode) as c_int
+}
+
 #[cfg(target_os = "linux")]
 pub unsafe fn init(sp: &'static Stack) {
     let mut tp = 0usize;