/Userspace-exec

Trying to write a userspace exec, initially in C might port it to rust later. Purely an attempt to learn about dynamic linking and some elf quirks.

Primary LanguageZig

  • Currently reads an add function from add.o and executes it from zig.

To compile add.c:

Warning

Do not use gcc, theres an endbr64 instruction on the top that causes issues

clang -c add.c -o add.o

# Alternatively you can use the zig c compiler

zig cc -c add.c -o add.o

To execute the add function via zig:

zig build run

alt text

References