[Bug lto/86517] relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object with LTO
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 16 07:58:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86517
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 44397
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44397&action=edit
Full reproducer
As mentioned in my first commit, -shared was only used in order to reduce the
test-case. I'm attaching full version that show issue with:
$ rm x.a ; gcc -fPIC -c -O2 lib*.i -flto && ar rv x.a lib*.o && gcc -rdynamic
-fPIE [1-9].i -c -O2 -flto && gcc -pie [1-9].o -rdynamic x.a -pthread -ldl
-lxml2 -flto
That works:
$ rm x.a ; gcc -fPIC -c -O2 lib*.i && ar rv x.a lib*.o && gcc -rdynamic -fPIE
[1-9].i -c -O2 && gcc -pie [1-9].o -rdynamic x.a -pthread -ldl -lxml2
More information about the Gcc-bugs
mailing list