[[!template id=project title="Build the kernel as PIE" contact=""" [tech-kern](mailto:tech-kern@NetBSD.org) """ category="kernel" difficulty="medium" done_by="Maxime Villard" description=""" Add a toolchain infrastructure that allows the kernel to be compiled as Position Independent Executable (PIE). Typically, having the kernel compiled as a kernel module itself - using the already-existing infrastructure - would be a good start. Then, some choices and proposals can be made to optimize performance of the kernel binary at the instruction level. Deliverables: * A set of Makefile changes that allow to build a PIE kernel at least on amd64 and i386. * If possible, an evaluation of the performance cost. It may be a little difficult to test the implementation, because the kernel won't boot. But as long as the kernel ELF binary is structurally correct it's fine. """ ]]