![]() |
MOS Source Code
|
#include "mos/tasks/elf.hpp"#include "mos/filesystem/vfs.hpp"#include "mos/mm/mm.hpp"#include "mos/mm/mmap.hpp"#include "mos/platform/platform.hpp"#include "mos/tasks/process.hpp"#include "mos/tasks/schedule.hpp"#include "mos/tasks/task_types.hpp"#include "mos/tasks/thread.hpp"#include <elf.h>#include <mos/types.hpp>#include <mos/vector.hpp>#include <mos_stdlib.hpp>#include <mos_string.hpp>Go to the source code of this file.
| MOS_STATIC_ASSERT | ( | sizeof(elf_header_t) | = =0x40, |
| "elf_header has wrong size" | ) |
| MOS_STATIC_ASSERT | ( | sizeof(elf_program_hdr_t) | = =0x38, |
| "elf_program_header has wrong size" | ) |
|
static |
Definition at line 23 of file elf.cpp.
Referenced by elf_read_and_verify_executable().
|
staticnodiscard |
Definition at line 49 of file elf.cpp.
Referenced by elf_do_fill_process(), elf_map_interpreter(), and elf_read_and_verify_executable().
|
static |
Definition at line 55 of file elf.cpp.
Referenced by elf_do_fill_process().
|
static |
Typical Stack Layout:
(low address) |-> u32 argc |-> ptr_t argv[] | |-> NULL |-> ptr_t envp[] | |-> NULL |-> AuxV | |-> AT_... | |-> AT_NULL |-> argv strings, NULL-terminated |-> environment strings, NULL-terminated |-> u32 zero (high address, end of stack)
Definition at line 79 of file elf.cpp.
Referenced by elf_do_fill_process().
|
static |
Definition at line 149 of file elf.cpp.
Referenced by elf_do_fill_process(), and elf_map_interpreter().
Definition at line 192 of file elf.cpp.
Referenced by elf_do_fill_process().
|
nodiscard |
Definition at line 232 of file elf.cpp.
Referenced by elf_fill_process(), and process_do_execveat().
|
nodiscard |
Definition at line 347 of file elf.cpp.
Referenced by elf_fill_process(), elf_map_interpreter(), and process_do_execveat().
|
staticnodiscard |
Definition at line 362 of file elf.cpp.
Referenced by elf_create_process().
| Process * elf_create_process | ( | mos::string_view | path, |
| Process * | parent, | ||
| const mos::vector< mos::string > & | argv, | ||
| const mos::vector< mos::string > & | envp, | ||
| const stdio_t * | ios ) |
Definition at line 384 of file elf.cpp.
Referenced by mos_start_kernel(), and MOS_STATIC_ASSERT().