|
@@ -26,7 +26,6 @@ use crate::{
|
|
|
};
|
|
|
|
|
|
use super::{
|
|
|
- access,
|
|
|
debug::{RTLDDebug, RTLDState, _dl_debug_state, _r_debug},
|
|
|
tcb::{Master, Tcb},
|
|
|
PAGE_SIZE,
|
|
@@ -164,20 +163,7 @@ impl Linker {
|
|
|
if self.verbose {
|
|
|
println!("check {}", path);
|
|
|
}
|
|
|
- let access = unsafe {
|
|
|
- let path_c = CString::new(path.as_bytes()).map_err(|err| {
|
|
|
- Error::Malformed(format!("invalid path '{}': {}", path, err))
|
|
|
- })?;
|
|
|
-
|
|
|
- // TODO: Use R_OK | X_OK
|
|
|
- // 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 {
|
|
|
- return Ok(Some(self.load_recursive(name, &path)?));
|
|
|
- }
|
|
|
+ return Ok(Some(self.load_recursive(name, &path)?));
|
|
|
}
|
|
|
|
|
|
Err(Error::Malformed(format!("failed to locate '{}'", name)))
|