x86_64 kernel relocation question
kevint
kevint at lanl.gov
Wed Jan 9 19:45:28 EST 2008
Hello,
I am relatively new to kexec, and am running into some problems with
relocations when I try to use kexec to load several different X86_64
kernels. I think this is the correct list to post to, but please
point me in the right direction if it isn't.
Here is some of the information on my test environment:
$ kexec --version
kexec-tools-testing 20071030 released 30th October 2007
$ uname -r
2.6.21.5
RHEL5 Kernel:
$ file /tmp/vmlinuz
/tmp/vmlinuz: ELF 64-bit LSB shared object, AMD x86-64, version 1,
stripped
Buildroot generated kernel (bzImage) with initramfs:
# file /tmp/linux-kernel-2.6.21.5-x86_64
/tmp/linux-kernel-2.6.21.5-x86_64: Linux kernel x86 boot executable
RO-rootFS, root_dev 0x801, swap_dev 0x5, Normal VGA
Here is the output I am getting:
(note: I usually have more options, but i get same errors regardless)
$ kexec -l /tmp/vmlinuz
Unhandled rela relocation: 4258616
I noticed this line in the source file, kexec/arch/x86_64/kexec-elf-
rel-x86_64.c:
die("Unhandled rela relocation: %lu\n", reloc_name(r_type));
I figured %lu should be %s, so I changed it, and got the following
output:
$ kexec -l /tmp/vmlinuz
Unhandled rela relocation: R_X86_64_PLT32
I noticed that it is not handled by kexec/arch/x86_64/kexec-elf-rel-
x86_64.c, so figured I either am trying to kexec an incompatible
kernel image or this relocation needs to be handled. I made it
further by hacking in a (non-working) case for this relocation type,
but then came across R_X86_64_GOTPCREL. I don't think calculating
the relocation address for a PLT or a GOT relocation is trivial, so I
am hoping I am doing something else wrong.
I would appreciate any help you can provide.
Thank you!
********************************************
Kevin Tegtmeier
HPC-3 Scientific Computing Resources
Los Alamos National Laboratory
email: kevint at lanl dot gov
********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.infradead.org/pipermail/kexec/attachments/20080109/f58ca422/attachment.html
More information about the kexec
mailing list