Le 06/10/2017 à 10:37, Martin Husemann a écrit :
I don't get the issue with the bootloader - it just loads one binary and doesn't care about ASLR, the "prekernel" entry point handles that later (rearranging any mappings the bootloader might have previously done afterwards)?
The bootloader loads *two* binaries: the prekern with loadfile_static(), and the kernel with loadfile_dynamic(). The former is used by all the architectures we support, and it uses the memory address referenced in the ELF segments. The latter chooses an address (see my XXX in bootloader.diff), and maps the sections starting from there. Basically, the problem is that if the prekern and the kernel are merged in one binary, we're forced to have only one function, and it will be shared by all architectures. Here, it becomes complicated to implement both the static and dynamic loading, and it will certainly result in breakages or inconsistencies. Beyond this bootloader issue, having dynamic+static sections&segments in a single binary is not structurally correct from an ELF pov. Maxime