aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2008-11-19 06:16:04 +0000
committerHans-Peter Nilsson <hp@axis.com>2008-11-19 06:16:04 +0000
commitf3294356795afeb23a6f1394e769e2c6ac45420e (patch)
tree233ec07841629ba98574455785b9d35212c1ef8c /gas
parent156b28010a671f6c282852083c8e78d0282508bf (diff)
downloadfsf-binutils-gdb-f3294356795afeb23a6f1394e769e2c6ac45420e.zip
fsf-binutils-gdb-f3294356795afeb23a6f1394e769e2c6ac45420e.tar.gz
fsf-binutils-gdb-f3294356795afeb23a6f1394e769e2c6ac45420e.tar.bz2
* config/tc-cris.c (cris_number_to_imm): Apply S_SET_THREAD_LOCAL
on symbols in TLS relocs.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-cris.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/gas/config/tc-cris.c b/gas/config/tc-cris.c
index 4b5ab3b..c64f786 100644
--- a/gas/config/tc-cris.c
+++ b/gas/config/tc-cris.c
@@ -3627,13 +3627,6 @@ cris_number_to_imm (char *bufp, long val, int n, fixS *fixP, segT seg)
regression tests on the object file contents. FIXME: Seems
uninteresting now that we have a test suite. */
- case BFD_RELOC_CRIS_16_GOT:
- case BFD_RELOC_CRIS_32_GOT:
- case BFD_RELOC_CRIS_32_GOTREL:
- case BFD_RELOC_CRIS_16_GOTPLT:
- case BFD_RELOC_CRIS_32_GOTPLT:
- case BFD_RELOC_CRIS_32_PLT_GOTREL:
- case BFD_RELOC_CRIS_32_PLT_PCREL:
case BFD_RELOC_CRIS_32_GOT_GD:
case BFD_RELOC_CRIS_16_GOT_GD:
case BFD_RELOC_CRIS_32_GD:
@@ -3643,6 +3636,19 @@ cris_number_to_imm (char *bufp, long val, int n, fixS *fixP, segT seg)
case BFD_RELOC_CRIS_16_GOT_TPREL:
case BFD_RELOC_CRIS_32_TPREL:
case BFD_RELOC_CRIS_16_TPREL:
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+ if (IS_ELF && fixP->fx_addsy != NULL)
+ S_SET_THREAD_LOCAL (fixP->fx_addsy);
+#endif
+ /* Fall through. */
+
+ case BFD_RELOC_CRIS_16_GOT:
+ case BFD_RELOC_CRIS_32_GOT:
+ case BFD_RELOC_CRIS_32_GOTREL:
+ case BFD_RELOC_CRIS_16_GOTPLT:
+ case BFD_RELOC_CRIS_32_GOTPLT:
+ case BFD_RELOC_CRIS_32_PLT_GOTREL:
+ case BFD_RELOC_CRIS_32_PLT_PCREL:
/* We don't want to put in any kind of non-zero bits in the data
being relocated for these. */
md_number_to_chars (bufp, 0, n);