[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/6480] New: tls-model global-dynamic w/o @PLT leading to binutils
From: |
edwintorok at gmail dot com |
Subject: |
[Bug ld/6480] New: tls-model global-dynamic w/o @PLT leading to binutils assertion failure |
Date: |
4 May 2008 12:25:55 -0000 |
I get a binutils assertion failure when compiling the testcase below (with
either gcc 4.2 or gcc 4.3)
$ gcc gd.c
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.18.0.20080103 assertion fail
../../bfd/elf64-x86-64.c:2548
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.18.0.20080103 assertion fail
../../bfd/elf64-x86-64.c:2548
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.18.0.20080103 assertion fail
../../bfd/elf64-x86-64.c:2548
gcc generates 'call __tls_get_addr'. If I replace it with 'call
address@hidden' I no longer get this assertion failure:
$ gcc gd.c -S -o gd.s
$ sed -i 's/__tls_get_addr/address@hidden/' gd.s
$ as gd.s -o gd.o && gcc gd.o
This is the testcase:
int f(void *a){
static __thread __attribute__((tls_model ("global-dynamic"))) int i = 1;
i++;
return i;
}
int main()
{
return f(0);
}
System info:
$ uname -a
Linux lightspeed2 2.6.25-rc8 #5 Tue Apr 8 21:16:47 EEST 2008 x86_64 GNU/Linux
$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2
--program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --disable-libmudflap --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.3 (Debian 4.2.3-4)
$ gcc-4.3 -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure linux gnu
Thread model: posix
gcc version 4.3.1 20080401 (prerelease) (Debian 4.3.0-3)
$ ld -v
GNU ld (GNU Binutils for Debian) 2.18.0.20080103
--
Summary: tls-model global-dynamic w/o @PLT leading to binutils
assertion failure
Product: binutils
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: edwintorok at gmail dot com
CC: bug-binutils at gnu dot org
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=6480
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/6480] New: tls-model global-dynamic w/o @PLT leading to binutils assertion failure,
edwintorok at gmail dot com <=