lkml.org 
[lkml]   [2012]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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


\
 
 \ /
  Last update: 2012-07-09 09:22    [W:0.149 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site