Add dummy implementations for more syscalls

master
Jiajie Chen 6 years ago
parent c7f9921e06
commit 36292e6fcd

@ -104,11 +104,10 @@ impl Thread {
envs: BTreeMap::new(),
auxv: {
let mut map = BTreeMap::new();
let phdr = elf.program_iter()
.find(|ph| ph.get_type() == Ok(Type::Phdr))
.expect("PHDR section not found")
.virtual_addr();
map.insert(abi::AT_PHDR, phdr as usize);
if let Some(phdr) = elf.program_iter()
.find(|ph| ph.get_type() == Ok(Type::Phdr)) {
map.insert(abi::AT_PHDR, phdr.virtual_addr() as usize);
}
map.insert(abi::AT_PHENT, elf.header.pt2.ph_entry_size() as usize);
map.insert(abi::AT_PHNUM, elf.header.pt2.ph_count() as usize);
map

@ -100,6 +100,22 @@ pub fn syscall(id: usize, args: [usize; 6], tf: &mut TrapFrame) -> isize {
warn!("sys_sigprocmask is unimplemented");
Ok(0)
}
016 => {
warn!("sys_ioctl is unimplemented");
Ok(0)
}
102 => {
warn!("sys_getuid is unimplemented");
Ok(0)
}
107 => {
warn!("sys_geteuid is unimplemented");
Ok(0)
}
108 => {
warn!("sys_getegid is unimplemented");
Ok(0)
}
131 => {
warn!("sys_sigaltstack is unimplemented");
Ok(0)

Loading…
Cancel
Save