summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@in.ibm.com>2007-03-07 13:52:18 +0530
committerSimon Horman <horms@verge.net.au>2007-03-07 17:57:20 +0900
commitd6c231c6f341d839fbfb09ea0814dd9a5ccdb005 (patch)
treedce709fe7173760e5282a0abd088bb11f21daf64
parent924b985aaba1a3cc17f419e93b3a31568070df7a (diff)
kexec-tools: x86_64 bzImage load purgatory below 2G
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@in.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/i386/kexec-bzImage.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kexec/arch/i386/kexec-bzImage.c b/kexec/arch/i386/kexec-bzImage.c
index aee5f00..19fef11 100644
--- a/kexec/arch/i386/kexec-bzImage.c
+++ b/kexec/arch/i386/kexec-bzImage.c
@@ -181,10 +181,14 @@ int do_bzImage_load(struct kexec_info *info,
/* 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);