[Bug lto/86517] relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object with LTO
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Jul 14 12:50:00 GMT 2018
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.
More information about the Gcc-bugs
mailing list