This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/86517] relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object with LTO
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 14 Jul 2018 12:24:33 +0000
- Subject: [Bug lto/86517] relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object with LTO
- Auto-submitted: auto-generated
- References: <bug-86517-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86517
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Jan Hubicka from comment #2)
> I think the problem here is that you can compile PIE and PIC object into pie
> binary
He used
gcc -pie -O2 -pthread -ldl -lxml2 1.o 2.o x.a -rdynamic -flto=9 -shared
^^^^^^^^^
-shared overrides -pie. He was building a shared object, not a PIE.