Sources Bugzilla – Bug 9938
TLS transition from R_386_TLS_GD to R_386_TLS_IE_32 error when compiling gettext-0.17
Last modified: 2009-03-12 17:15:54 UTC
when compiling gettext-0.17 on i386-pc-solaris2.10 with gcc-4.3.3 and binutils-2.19.50.0.1, i get: === gcc -std=gnu99 -fopenmp -fPIC -Wall -O2 -Wl,--enable-new-dtags -Wl,--rpath -Wl,/misc/i386-pc-solaris2.10/lib -o .libs/msgmerge msgmerge-msgmerge.o msgmerge-msgl-fsearch.o msgmerge-plural-count.o -fopenmp -L/misc/i386-pc-solaris2.10/lib ./.libs/libgettextsrc.so /tmp/gettext-0.17/gettext-tools/gnulib-lib/.libs/libgettextlib.so -lncurses /tmp/gettext-0.17/gettext-tools/intl/.libs/libintl.so -liconv -lc -lm -lsec -Wl,--rpath -Wl,/misc/i386-pc-solaris2.10/opt/gettext/0.17/lib /misc/i386-pc-solaris2.10/bin/ld: /misc/i386-pc-solaris2.10/opt/gcc/4.3.3/lib/gcc/i386-pc-solaris2.10/4.3.3/libgomp.a(loop.o): TLS transition from R_386_TLS_GD to R_386_TLS_IE_32 against `gomp_tls_data' at 0x1b in section `.text' failed /misc/i386-pc-solaris2.10/opt/gcc/4.3.3/lib/gcc/i386-pc-solaris2.10/4.3.3/libgomp.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[4]: *** [msgmerge] Error 1 make[4]: Leaving directory `/tmp/gettext-0.17/gettext-tools/src' make[3]: *** [all] Error 2 === i can't use binutils-2.19.51.0.2 yet, because of bug#521 (currently being worked on) ... not sure if this is somehow related (not an binutils expert -- just a user) ... not sure if this is a gcc problem also.
it seems, if i compile gettext-0.17 with --disable-openmp, i am fine (libgomp.a is simply not used). --disable-openmp is a good workaround for gettext, but maybe someone can figure out why ld is producing this error when linking against libgomp.a of gcc.
Please provide loop.o in libgomp.a.
Please also provide loop.s.
Created attachment 3809 [details] from /misc/i386-pc-solaris2.10/opt/gcc/4.3.3/lib/gcc/i386-pc-solaris2.10/4.3.3/libgomp.a
Created attachment 3810 [details] of loop.o
loop.o and loop.s look OK. If you can provide complete linker inputs with command line options so that I can reproduce it on Linux with a cross linker, I will take a look.
Created attachment 3811 [details] linker inputs, part1of3 hope these are all files you need. just tell if you need something else. exact commandline was: === gcc -std=gnu99 -fopenmp -Wall -O2 -Wl,--enable-new-dtags -Wl,--rpath -Wl,/misc/i386-pc-solaris2.10/lib -o .libs/msgmerge msgmerge-msgmerge.o msgmerge-msgl-fsearch.o msgmerge-plural-count.o -fopenmp -L/misc/i386-pc-solaris2.10/lib ./.libs/libgettextsrc.so /tmp/gettext-0.17/gettext-tools/gnulib-lib/.libs/libgettextlib.so -lncurses /tmp/gettext-0.17/gettext-tools/intl/.libs/libintl.so -liconv -lc -lm -lsec -Wl,--rpath -Wl,/misc/i386-pc-solaris2.10/opt/gettext/0.17/lib === and produced: === /misc/i386-pc-solaris2.10/bin/ld: /misc/i386-pc-solaris2.10/opt/gcc/4.3.3/lib/gcc/i386-pc-solaris2.10/4.3.3/libgomp.a(loop.o): TLS transition from R_386_TLS_GD to R_386_TLS_IE_32 against `gomp_tls_data' at 0x1b in section `.text' failed /misc/i386-pc-solaris2.10/opt/gcc/4.3.3/lib/gcc/i386-pc-solaris2.10/4.3.3/libgomp.a: could not read symbols: Bad value ===
Created attachment 3812 [details] linker inputs, part2of3
Created attachment 3813 [details] linker inputs, part3of3
(In reply to comment #7) > Created an attachment (id=3811) > linker inputs, part1 > > hope these are all files you need. just tell if you need something else. > That is not enough. Please use "gcc -v" to see what files are passed to linker. I need every single linker input file.
Created attachment 3814 [details] additional files sorry. i am really not a gcc/binutils expert. thanks for the -v hint and thanks for great support! see the attached file. hope it contains now all missing files you need.
(In reply to comment #11) > Created an attachment (id=3814) > additional files > > sorry. i am really not a gcc/binutils expert. thanks for the -v hint and thanks > for great support! Please provide the output of "gcc -v" so that I can run linker with the same set of inputs.
Created attachment 3815 [details] gcc -v output thank you for being so patience with me ;-)
Subject: Bug 9938 CVSROOT: /cvs/src Module name: src Changes by: hjl@sourceware.org 2009-03-12 17:13:42 Modified files: bfd : ChangeLog elf32-i386.c elf64-x86-64.c Log message: 2009-03-12 H.J. Lu <hongjiu.lu@intel.com> PR ld/9938 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp to check ___tls_get_addr. * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use strncmp to check __tls_get_addr. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.4495&r2=1.4496 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf32-i386.c.diff?cvsroot=src&r1=1.192&r2=1.193 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf64-x86-64.c.diff?cvsroot=src&r1=1.151&r2=1.152
It is fixed by http://sourceware.org/ml/binutils/2009-03/msg00233.html The same fix can be used in binutils-2.19.50.0.1.