mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-08-15 05:18:32 +00:00
The current header implementation is incomplete: the text_offset and image_size slots are overlaid with internal relocation metadata (_rel_stack_base / _rel_stack_size), and the flags field is zero, which makes some bootloaders unhappy. Fill up the the missing props and while at it, stub out the image header into a header file to avoid duplicating. image_size is computed in the linker script as _stack_end - _start so the early stack page is included in the runtime memory footprint advertised to the previous-stage bootloader. Patch inspired by work from @Trijal08 and cleaned up to not account for ELF PiE.