From Jörg Sonnenberger <joerg@bec.de>: When linking PIC and non-PIC object files which access the same thread locale variable, R_386_TLS_GD and R_386_TLS_IE relocations are merged into a single R_386_TLS_TPOFF relocation, ignoring the different offset calculations. ftp://packages.stura.uni-rostock.de/misc/tls-reloc.tgz has a small test case. It results in a segfault of ld-linux.
Created attachment 954 [details] A testcase I added the testcase.
A patch is posted at http://sourceware.org/ml/binutils/2006-04/msg00128.html
I used the new binutils on gcc and glibc. Everything looks OK. Fixed.