eighty-six
eighty-six copied to clipboard
`.boot` section is flagged as writeable
The .boot section contains the multiboot header.
$ readelf -hS target/x86_64/release/kernel
[ 1] .boot PROGBITS 0000000000100000 000000b0
0000000000000018 0000000000000000 WA 0 0 1
Unsure how bad this really is, but it seems to be affecting the output of the size command:
$ size target/x86_64/release/kernel
text data bss dec hex filename
132 24 0 156 9c target/x86_64/release/kernel
size is classifying the .boot section as "data" when it should be classified as "text".
Possible solution: Place the multiboot header section under .text. This fixes the output of size but the multiheader section would then be flagged as executable, which is not true.
This just might be me being a noob.
@steveklabnik Nah, this is a problem with my implementation, which creates the multiboot header in the linker script. The intermezzos implementation doesn't have this problem:
$ size build/kernel.bin
text data bss dec hex filename
142 0 0 142 8e build/kernel.bin