KL-OS: Application

2026-01-01Genre: POSSE

Day 11 was about application.

First, a linker script named user.ln was made this time starting at address 1000000 so that the application doesn't overlap with the kernel space.

Then a simple userland library is created with minimal features just enough to indicate the existence of a userland application. A header file for the userland library is also made.

Then an application is made, very barebones, it is just an infinite loop for now since there is no way to print characters at the moment.

To build the application, we first compile it with cc to get an executable in a ELF format. The executable is then converted to raw binary format with the objcopy tool. Then the raw binary executable format is then again converted to a format that can be embedded in the C language.

Lastly, the shell.bin.o output is then passed to clang (kernel build section of the script) which gets embedded into the kernel image.


Webmentions

Have you written a response to this? Let me know the URL, Or, you can send your response via mail:iac@scientiac.space