This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
If I compile the following small program on x86-64 (with either GCC
3.3 CVS, GCC 3.3 hammer-branch CVS or 3.4 CVS) I get the following
error:
$ /opt/gcc/3.3-devel/bin/gcc -g -c tls.c -o tls.o -fPIC -ftls-model=local-exec
$ /opt/gcc/3.3-devel/bin/gcc -g -o tls.so -shared tls.o
/usr/bin/ld: tls.o: relocation R_X86_64_TPOFF32 can not be used when making a shared object; recompile with -fPIC
tls.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
The program is:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static __thread int foo;
int getTLSVar(void)
{
return foo;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This works fine on other platforms, e.g. i386.
Jakub, any ideas on this one?
Andreas
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Attachment:
pgp00000.pgp
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |