|
From: | Don Slutz |
Subject: | Re: [Qemu-devel] [Bug 1257099] [NEW] QEMU fails to build on CentOS 5.10 with relocation R_X86_64_PC32 error |
Date: | Mon, 9 Dec 2013 07:47:34 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
On 12/05/13 22:20, Don Slutz wrote:
On 12/05/13 16:24, Richard Henderson wrote:On 12/06/2013 04:18 AM, Paolo Bonzini wrote:$ gcc -shared -o f.so f.c -fPIE -fPIC/usr/bin/ld: /tmp/ccQc9els.o: relocation R_X86_64_PC32 against `f' can not be used when making a shared object; recompile with -fPIC/usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status The bug is simply that "-fPIE -fPIC" counts as -fPIE rather than -fPIC: $ gcc -S -o - f.c -fPIE |grep call call f # PC32 relocation $ gcc -S -o - f.c -fPIC |grep call call address@hidden # PLT32 relocationThe easy workaround is to drop -fPIE when we're adding -fPIC. r~
[snip]Attached is a much better version. It drops -fPIE and adds -fPIC for libtool.
-Don Slutz
0001-configure-Switch-libtool-from-fPIE-to-fPIC-bug-12570.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |