[PATCH] Improve and consolidate sparc PIC assembler.
davem at davemloft.net
Sat Apr 13 21:42:27 CEST 2013
From: Torbjorn Granlund <tg at gmplib.org>
Date: Sat, 13 Apr 2013 21:10:35 +0200
> > ld: fatal: relocation error: R_SPARC_GOTDATA_OP_LOX10: file mpn/.libs/gcd_1.o: symbol ctz_table: relocation illegal for TLS symbol
> > ld: fatal: relocation error: R_SPARC_GOTDATA_OP: file mpn/.libs/gcd_1.o: symbol ctz_table: relocation illegal for TLS symbol
> > TLS? Thread local storage?
> Sun's tools give the worst diagnostics in the world. Yes, that's what it
> means by TLS.
> Which seems nonsensical.
I think I found the problem, from the GCC install notes:
There is a bug in older versions of the Sun assembler which breaks thread-local storage (TLS). A typical error message is
ld: fatal: relocation error: R_SPARC_TLS_LE_HIX22: file /var/tmp//ccamPA1v.o:
symbol <unknown>: bad symbol type SECT: symbol type must be TLS
This bug is fixed in Sun patch 118683-03 or later.
>From that patch:
6728528 assembler does not handle __thread code correctly
We're probably hitting that bug.
More information about the gmp-devel