[PATCH 2/2] kexec-tools: x86_64 bzImage load purgatory below 2G

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


o Load purgatory below 2G while loading bzImage. x86_64 purgatory got
  relocation types R_X86_64_32S hence got to be below 2G.

Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx>
---


diff -puN kexec/arch/i386/kexec-bzImage.c~kexec-tools-x86_64-bzImage-load-purgatory-below-2G kexec/arch/i386/kexec-bzImage.c
--- kexec-tools-git-2nd-march/kexec/arch/i386/kexec-bzImage.c~kexec-tools-x86_64-bzImage-load-purgatory-below-2G	2007-03-07 13:25:11.000000000 +0530
+++ kexec-tools-git-2nd-march-root/kexec/arch/i386/kexec-bzImage.c	2007-03-07 13:25:11.000000000 +0530
@@ -181,10 +181,14 @@ int do_bzImage_load(struct kexec_info *i
 	/* Load the trampoline.  This must load at a higher address
 	 * the the argument/parameter segment or the kernel will stomp
 	 * it's gdt.
+	 *
+	 * x86_64 purgatory code has got relocations type R_X86_64_32S
+	 * that means purgatory got to be loaded within first 2G otherwise
+	 * overflow takes place while applying relocations.
 	 */
 	if (!real_mode_entry && relocatable_kernel)
 		elf_rel_build_load(info, &info->rhdr, purgatory, purgatory_size,
-					0x3000, -1, -1, 0);
+					0x3000, 0x7fffffff, -1, 0);
 	else
 		elf_rel_build_load(info, &info->rhdr, purgatory, purgatory_size,
 					0x3000, 640*1024, -1, 0);
_
_______________________________________________
fastboot mailing list
fastboot@xxxxxxxxxxxxxx
https://lists.osdl.org/mailman/listinfo/fastboot


[Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Linux Media]     [Linux Resources]

Powered by Linux