https://sourceware.org/bugzilla/show_bug.cgi?id=22721
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
[hjl@gnu-6 pr22721]$ cat foo1.c
extern __thread int foo_var;
int
main (void)
{
return foo_var;
}
[hjl@gnu-6 pr22721]$ cat foo2.c
__thread int foo_var = 2;
[hjl@gnu-6 pr22721]$ cat tls.S
.text
.globl __tls_get_addr
.globl ___tls_get_addr
__tls_get_addr:
___tls_get_addr:
ret
[hjl@gnu-6 pr22721]$ cat tls.v
SUNWprivate_1.1 {
global:
__tls_get_addr;
___tls_get_addr;
local:
*;
};
[hjl@gnu-6 pr22721]$ make
gcc -m32 -O2 -flto -fPIC -c -o foo1.o foo1.c
gcc -m32 -c -o tls.o tls.S
./ld -m elf_i386 -shared -o libtls.so tls.o --version-script tls.v
gcc -m32 -O2 -flto -fPIC -c -o foo2.o foo2.c
gcc -m32 -O2 -flto -o foo1 foo1.o libtls.so foo2.o
/usr/local/bin/ld: /tmp/ccmYn52R.ltrans0.ltrans.o: TLS transition from
R_386_TLS_GD to R_386_TLS_IE_32 against `foo_var' at 0x15 in section
`.text.startup' failed
/usr/local/bin/ld: warning: type and size of dynamic symbol
`___tls_get_addr@@SUNWprivate_1.1' are not defined
/usr/local/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make: *** [Makefile:26: foo1] Error 1
[hjl@gnu-6 pr22721]$
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils