sysprog21 / semu

A minimalist RISC-V system emulator capable of running Linux kernel
MIT License
251 stars 47 forks source link

Unset CONFIG_STRICT_KERNEL_RWX in kernel configuration #27

Closed onnokort closed 1 year ago

onnokort commented 1 year ago

This will reduce kernel size from ~21MiB to ~5MiB as it removes huge alignment sections in the linker script. For details, see symbol SECTION_ALIGN in

arch/riscv/include/asm/set_memory.h

and

arch/riscv/kernel/vmlinux.lds.S

It should be noted, however, that this might trade kernel binary load size for security in some settings.

jserv commented 1 year ago

Thank @onnokort for contributing!