ELF64 RELA with type R_X86_64_PLT32
Posted: Thu Sep 16, 2010 10:15 am
Hi guys,
Im having some trouble with loading a Relocatable ELF64...
At the moment GRUB loads my ELF64 Loader and the 64 bit ELF kernel as a module.
The ELF64 Loader then proceeds to locate the kernel_main symbol whils also going through any RELA section and applying any relocations.
I know my Kernel shouldnt need anything from the ELF64 Loader, but I have put in some undefined functions to test the loader.
However, all of my undefined symbols have a type of 0x4 (R_X86_64_PLT32).
I cannot find any info on how to handle a symbol of this type and my kernel has no .*.plt.
Im just wandering if anyone has any information that may help me.
EDIT: It seems a few more minutes spent googling and I found the answer, however Id still like any info regarding to the above
The fix was to compile the kernel with '-mcmodel=kernel'
Im having some trouble with loading a Relocatable ELF64...
At the moment GRUB loads my ELF64 Loader and the 64 bit ELF kernel as a module.
The ELF64 Loader then proceeds to locate the kernel_main symbol whils also going through any RELA section and applying any relocations.
I know my Kernel shouldnt need anything from the ELF64 Loader, but I have put in some undefined functions to test the loader.
However, all of my undefined symbols have a type of 0x4 (R_X86_64_PLT32).
I cannot find any info on how to handle a symbol of this type and my kernel has no .*.plt.
Im just wandering if anyone has any information that may help me.
EDIT: It seems a few more minutes spent googling and I found the answer, however Id still like any info regarding to the above
The fix was to compile the kernel with '-mcmodel=kernel'