Add a kernel ELF module and load it in a new process.

Don't yet jump to userspace.
This commit is contained in:
Drew Galbraith 2023-05-29 00:32:54 -07:00
parent f86bbe6ea9
commit aefb4f082b
22 changed files with 223 additions and 16 deletions

17
sys/CMakeLists.txt Normal file
View file

@ -0,0 +1,17 @@
set(_COMPILE_FLAGS "-ffreestanding -mgeneral-regs-only")
set(_LINK_FLAGS "-nostdlib")
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
add_executable(test
test.cpp
)
target_link_libraries(test
zion_lib)
set_target_properties(test
PROPERTIES
COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${_COMPILE_FLAGS}"
LINK_FLAGS "${CMAKE_EXE_LINK_FLAGS} ${_LINK_FLAGS}"
)

7
sys/test.cpp Normal file
View file

@ -0,0 +1,7 @@
#include "zcall.h"
int main() {
ZDebug("Testing");
return 0;
}