Page 1 of 1

64bit big kernel gets small with z max-page-size=0x1000

Posted: Wed Mar 02, 2011 1:41 pm
by AlfaOmega08
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

Re: 64bit big kernel gets small with z max-page-size=0x1000

Posted: Wed Mar 02, 2011 3:00 pm
by Tosi
Did you look in the binutils manual, at x86_64 (or maybe just x86) specific command line switches?