here I am again, and after some weeks I finally got the bootloader compiling and I uploaded it to codeberg.
The only thing that fails is running. When I run it in QEMU, the program loaded by UEFI just exits with err: integer overflow and UEFI searches for other media or does whatever.
Using my debug information I implemented in the bootloader, I found the position of the error: src/bootloader/elf.zig:240.
But what could be the cause of an integer overflow there?
Is that error a Zig panic? If so, I don’t see any way line 240 could cause it. Based on your debug prints, are you sure it is not line 247 or 250? Perhaps your ELF header structures are not quite aligned with your kernel image, and e_phnum is some very large int.