支持对动态链接文件的加载,支持通过musl工具链编写用户空间程序 (#504)

支持对动态链接文件的加载,支持通过musl工具链编写用户空间程序
This commit is contained in:
Chiichen
2024-01-28 20:29:01 +08:00
committed by GitHub
parent 5d549a76ab
commit a02ce654cf
8 changed files with 186 additions and 49 deletions

View File

@ -0,0 +1,10 @@
use crate::{arch::MMArch, libs::elf::ElfArch, mm::MemoryManagementArch};
#[derive(Debug, Clone, Copy, Hash)]
pub struct X86_64ElfArch;
impl ElfArch for X86_64ElfArch {
const ELF_ET_DYN_BASE: usize = MMArch::USER_END_VADDR.data() / 3 * 2;
const ELF_PAGE_SIZE: usize = MMArch::PAGE_SIZE;
}