diff options
Diffstat (limited to 'arch/x86/boot/compressed/misc.c')
-rw-r--r-- | arch/x86/boot/compressed/misc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 8e4b55dd5df9..8dd1d5ccae58 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c | |||
@@ -300,6 +300,10 @@ static void parse_elf(void *output) | |||
300 | 300 | ||
301 | switch (phdr->p_type) { | 301 | switch (phdr->p_type) { |
302 | case PT_LOAD: | 302 | case PT_LOAD: |
303 | #ifdef CONFIG_X86_64 | ||
304 | if ((phdr->p_align % 0x200000) != 0) | ||
305 | error("Alignment of LOAD segment isn't multiple of 2MB"); | ||
306 | #endif | ||
303 | #ifdef CONFIG_RELOCATABLE | 307 | #ifdef CONFIG_RELOCATABLE |
304 | dest = output; | 308 | dest = output; |
305 | dest += (phdr->p_paddr - LOAD_PHYSICAL_ADDR); | 309 | dest += (phdr->p_paddr - LOAD_PHYSICAL_ADDR); |