[Bug lto/94138] [gcc10] unresolvable R_X86_64_TPOFF32 relocation against symbol when LTO activated

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 11 14:49:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94138

--- Comment #11 from Martin Liška <marxin at gcc dot gnu.org> ---
Good, now I can see a similar issue:

$ gcc  -o cache_locality_test -L. libfolly.so -pthread CacheLocalityTest.o
-shared
/usr/bin/ld: /tmp/cache_locality_test.Kz3DE7.ltrans0.ltrans.o: relocation
R_X86_64_TPOFF32 against `_ZL10testingCpu' can not be used when making a shared
object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status

and I can confirm adding -fPIC helps.


More information about the Gcc-bugs mailing list