diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2016-02-01 17:03:56 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-02-01 17:03:56 +0000 |
commit | b125bd17270aca2af4d945ce8477f981dbc27e7e (patch) | |
tree | dee7846f57862af549329d08bb93a4000807c626 /gas/testsuite | |
parent | 4f1d62057fa4894e504458027ac3228404144f7d (diff) | |
download | gdb-b125bd17270aca2af4d945ce8477f981dbc27e7e.zip gdb-b125bd17270aca2af4d945ce8477f981dbc27e7e.tar.gz gdb-b125bd17270aca2af4d945ce8477f981dbc27e7e.tar.bz2 |
Fix ARC TLS support.
* config/tc-arc.c (md_apply_fix): Allow addendum.
(arc_reloc_op): Allow complex expressions for tpoff.
(md_apply_fix): Handle resolved TLS local symbol.
* gas/arc/tls-relocs1.d: New file.
* gas/arc/tls-relocs1.s: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/arc/tls-relocs1.d | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/arc/tls-relocs1.s | 24 |
2 files changed, 36 insertions, 0 deletions
diff --git a/gas/testsuite/gas/arc/tls-relocs1.d b/gas/testsuite/gas/arc/tls-relocs1.d new file mode 100644 index 0000000..3944874 --- /dev/null +++ b/gas/testsuite/gas/arc/tls-relocs1.d @@ -0,0 +1,12 @@ +#as: -mcpu=archs +#objdump: -dr + +.*: +file format .*arc.* + + +Disassembly of section .text: + +00000000 <foo>: + 0: 2100 3f82 0000 0000 add r2,r25,0 + 4: R_ARC_TLS_LE_32 a\+0x30 + 8: 2000 0f80 0000 003c add r0,r0,0x3c diff --git a/gas/testsuite/gas/arc/tls-relocs1.s b/gas/testsuite/gas/arc/tls-relocs1.s new file mode 100644 index 0000000..fc71e66 --- /dev/null +++ b/gas/testsuite/gas/arc/tls-relocs1.s @@ -0,0 +1,24 @@ +;;; TLS tests: check tpoff addendum and resolving local TLS symbols. + + .cpu HS + .global a + .section .tbss,"awT",@nobits + .align 4 + .type a, @object + .size a, 60 +a: + .zero 60 + + .type local_tls_var, @object + .size local_tls_var, 4 +local_tls_var: + .zero 4 + + + .section .text + .align 4 +foo: +;;; Test if the tpoff addendum is correctly generated. + add r2,r25,@a@tpoff+48 +;;; Test if local TLS symbol is correctly resolved. + add r0,r0,@local_tls_var@dtpoff@.tbss |