【发布时间】:2016-06-13 12:45:29
【问题描述】:
这是我的示例程序,
int main()
{
static __thread int a;
printf("\n %d",a);
return 0;
}
在这个程序中,当 printf 语句被删除时,它链接正常。 当包含 printf 语句时,它会给出以下链接器错误
ld: fatal: relocation error: R_SPARC_TLS_LE_HIX22: file /var/tmp//ccwb2Cxc.o: symbol <unknown>: bad symbol type SECT: symbol type must be TLS
处理器:SUN-SPARC 操作系统:UNIX
【问题讨论】:
标签: c++ multithreading pthreads sparc thread-local-storage