hermit-os / loader

The Hermit bootloader.
Apache License 2.0
68 stars 22 forks source link

find_kernel: fix ELF module boundaries #377

Closed cagatay-y closed 1 week ago

cagatay-y commented 3 weeks ago

I am not very sure about this one, but I think the function is supposed the return the slice between the start and end addresses in the first module. It looks like the end value for the first module and the maximum end value for all the modules (needed for mapping them) was confused. If my understanding is correct, the caller would still work because the functions it calls determine the length it reads from the returned slice by other means, so the slice being too large does not hurt.