![]() |
MOS Source Code
|
#include "mos/tasks/process.hpp"#include "mos/tasks/task_types.hpp"#include <elf.h>#include <mos/types.hpp>#include <mos/vector.hpp>Go to the source code of this file.
Classes | |
| struct | elf_identity_t |
| struct | elf_header_t |
| struct | elf_program_hdr_t |
| struct | elf_startup_info_t |
Macros | |
| #define | ELF_ENDIANNESS_MOS_DEFAULT ELF_ENDIANNESS_MSB |
Enumerations | |
| enum | elf_endianness { ELF_ENDIANNESS_INVALID = 0 , ELF_ENDIANNESS_LSB = 1 , ELF_ENDIANNESS_MSB = 2 } |
| enum | elf_program_header_type { ELF_PT_NULL = 0 , ELF_PT_LOAD = 1 , ELF_PT_DYNAMIC = 2 , ELF_PT_INTERP = 3 , ELF_PT_NOTE = 4 , ELF_PT_SHLIB = 5 , ELF_PT_PHDR = 6 , ELF_PT_TLS = 7 , _ELF_PT_COUNT , ELF_PT_OS_LOW = 0x60000000 , ELF_PT_OS_HIGH = 0x6fffffff , ELF_PT_PROCESSOR_LO = 0x70000000 , ELF_PT_PROCESSOR_HI = 0x7fffffff } |
| enum | elf_ph_flags { ELF_PF_X = 1 << 0 , ELF_PF_W = 1 << 1 , ELF_PF_R = 1 << 2 } |
Functions | |
| MOS_STATIC_ASSERT (sizeof(elf_identity_t)==16, "elf_identity_t has wrong size") | |
| bool | elf_read_and_verify_executable (FsBaseFile *file, elf_header_t *header) |
| bool | elf_do_fill_process (Process *proc, FsBaseFile *file, elf_header_t elf, elf_startup_info_t *info) |
| 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) |
| #define ELF_ENDIANNESS_MOS_DEFAULT ELF_ENDIANNESS_MSB |
Definition at line 22 of file elf.hpp.
Referenced by elf_verify_header().
| enum elf_endianness |
| enum elf_ph_flags |
| MOS_STATIC_ASSERT | ( | sizeof(elf_identity_t) | = =16, |
| "elf_identity_t has wrong size" | ) |
|
nodiscard |
Definition at line 347 of file elf.cpp.
Referenced by elf_fill_process(), elf_map_interpreter(), and process_do_execveat().
|
nodiscard |
Definition at line 232 of file elf.cpp.
Referenced by elf_fill_process(), and process_do_execveat().
| 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().