Messages in this thread | | | From | (Eric W. Biederman) | Date | Sun, 08 Jul 2012 23:50:38 -0700 | Subject | Re: [PATCH 2/2] x86, boot: Optimize the elf header handling. |
| |
"H. Peter Anvin" <hpa@zytor.com> writes:
> On 07/01/2012 01:40 PM, Eric W. Biederman wrote: >> >> So I have tracked down part of the crazyness. >> CONFIG_RODATA actually uses 2MB alignment, making >> -z max_page_size=4096 a bit questionable. >> > > Questionable how? It's not really like it matters since we're not going > to mmap the ELF.
Questionable as in the current elf loader in misc.c relies on the fact that there is an almost a fixed offset between physical addresses and file offsets for all of the PT_LOAD segments in the Elf header.
In fact CONFIG_RODATA && CONFIG_X86_64 && CONFIG_SMP in combination with -z max_page_size=4096 fails to boot. The Elf loader in misc.c starts coping from lower addresses to higher addresses, instead of higher addresses to lower and that fails miserably.
But -z max_page_size=4096 is not the problem the ELF loader is.
Eric
| |