64bit big kernel gets small with z max-page-size=0x1000
Posted: Wed Mar 02, 2011 1:41 pm
Following the wiki tutorial to get grub2 booting my 64bit kernel, I found that my mb header was put at 1mb+ in the elf file. The whole executable was 1.2mb. It was far bigger than I expected.
The tutorial says, in case I have a too large kernel to do a list of hacks in the ld script, the makefile etc. However the only one which actually does its job is this: putting "z max-page-size=0x1000" in the linker command line.
This reduced the size to 200-300Kb. However I would like to understand this command, its side effects, why it's needed, what was the "default" value etc.
Thanks in advance
The tutorial says, in case I have a too large kernel to do a list of hacks in the ld script, the makefile etc. However the only one which actually does its job is this: putting "z max-page-size=0x1000" in the linker command line.
This reduced the size to 200-300Kb. However I would like to understand this command, its side effects, why it's needed, what was the "default" value etc.
Thanks in advance