Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 364873

Summary: sys-apps/kexec-tools won't load a kernel image when built with -fPIC
Product: Gentoo Linux Reporter: Otamay <Mauri.Chavez.Rdz>
Component: [OLD] Core systemAssignee: Gentoo Kernel Miscellaneous <kernel-misc>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Dirty patch for sys-apps/kexec-tools-2.0.2-r1.ebuild

Description Otamay 2011-04-25 23:15:16 UTC
Similar to Bug 183062 , kexec built with CFLAGS="-fPIC" fails to load any kernel image, resulting in "Unhandled rela relocation: R_X86_64_PLT32".

Filtering the -fPIC flag allows kexec to successfully load any kernel capable of.


Reproducible: Always

Steps to Reproduce:
1. Build sys-apps/kexec-tools-2.0.2-r1 with CFLAGS="-fPIC"
2. Load a kernel with kexec -l /boot/vmlinuz
3. Chech the resulting error.
Actual Results:  
Unhandled rela relocation: R_X86_64_PLT32

Expected Results:  
No error, kernel loaded and ready to a reboot.

Gentoo GNU/Linux on an AMD64 processor.
Comment 1 Otamay 2011-04-25 23:18:05 UTC
Created attachment 271175 [details, diff]
Dirty patch for sys-apps/kexec-tools-2.0.2-r1.ebuild

Proposed dirty patch for sys-apps/kexec-tools-2.0.2-r1.ebuild, to filter the -fPIC cflag allowing a built kexec capable to load kernels capable of.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-09-11 23:40:30 UTC
Do not add -fPIC to your flags unconditionally, such a situation is not supported.