[swift-dev] Issues when building swift using GNU 2.26 related to protected symbols

Dmitri Gribenko gribozavr at gmail.com
Sat Feb 20 22:06:28 CST 2016


Hi,

I was running some tests using newer GNU ld, and I hit this issue:

/usr/bin/ld: stdlib/public/core/linux/x86_64/Swift.o: relocation
R_X86_64_PC32 against protected symbol
`_Tvs19_emptyStringStorageVs6UInt32' can not be used when making a
shared object

I could work around that issue by moving the definition into a C++
file, but that didn't get me far -- I got the same error, but about
'_TMPSa' (generic type metadata pattern for Swift.Array).

Does it seem like a bug in LLVM codegen or another bug in GNU ld that
was introduced recently?

This issue will prevent Swift from compiling on Ubuntu 16.04 or a recent Debian.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the swift-dev mailing list