Skip to content

kernel::arch::host::linker_stubs

Definitions for the symbols that flint32.ld and the trap assembly supply on the target.

spawn and debug::panic declare these in extern "C" blocks and take their addresses — the linker script places them at the ends of the task-stack pool and at the base of the reserved panic region. On a host there is no linker script, so without definitions here the test binary does not link and every test in the crate goes unrun, which was the status quo.

These are placeholders, not a memory map. _task_stack_start and _task_stack_end are unrelated statics whose addresses have no defined ordering, so the stack allocator’s arithmetic is meaningless here and spawn::alloc_stack must not be called from a host test. The panic region is sized correctly (4 KiB, matching the linker script) so that size_of::<PanicSnapshot>() is checked against a real bound rather than an invented one.