This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/86517] relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object with LTO


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]