|
1 | 1 | # REQUIRES: systemz
|
2 | 2 | # RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux %s -o %t.o
|
3 |
| -# RUN: echo '.tbss; .globl b, c; b: .zero 4; c:' | llvm-mc -filetype=obj -triple=s390x-unknown-linux - -o %t1.o |
| 3 | +# RUN: echo '.globl __tls_get_offset; __tls_get_offset:; .tbss; .globl b, c; b: .zero 4; c:' | \ |
| 4 | +# RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux - -o %t1.o |
4 | 5 | # RUN: ld.lld -shared -soname=t1.so %t1.o -o %t1.so
|
5 | 6 |
|
6 | 7 | # RUN: ld.lld -shared %t.o %t1.o -o %t.so
|
|
19 | 20 | # RUN: llvm-objdump --section .data.rel.ro --full-contents %t.ie | FileCheck --check-prefix=IE-DATA %s
|
20 | 21 |
|
21 | 22 | # GD-REL: Relocation section '.rela.dyn' at offset {{.*}} contains 6 entries:
|
22 |
| -# GD-REL: 0000000000002570 0000000200000036 R_390_TLS_DTPMOD 0000000000000008 a + 0 |
23 |
| -# GD-REL-NEXT: 0000000000002578 0000000200000037 R_390_TLS_DTPOFF 0000000000000008 a + 0 |
24 |
| -# GD-REL-NEXT: 0000000000002580 0000000300000036 R_390_TLS_DTPMOD 000000000000000c b + 0 |
25 |
| -# GD-REL-NEXT: 0000000000002588 0000000300000037 R_390_TLS_DTPOFF 000000000000000c b + 0 |
26 |
| -# GD-REL-NEXT: 0000000000002590 0000000400000036 R_390_TLS_DTPMOD 0000000000000010 c + 0 |
27 |
| -# GD-REL-NEXT: 0000000000002598 0000000400000037 R_390_TLS_DTPOFF 0000000000000010 c + 0 |
| 23 | +# GD-REL: 0000000000002570 {{.*}} R_390_TLS_DTPMOD 0000000000000008 a + 0 |
| 24 | +# GD-REL-NEXT: 0000000000002578 {{.*}} R_390_TLS_DTPOFF 0000000000000008 a + 0 |
| 25 | +# GD-REL-NEXT: 0000000000002580 {{.*}} R_390_TLS_DTPMOD 000000000000000c b + 0 |
| 26 | +# GD-REL-NEXT: 0000000000002588 {{.*}} R_390_TLS_DTPOFF 000000000000000c b + 0 |
| 27 | +# GD-REL-NEXT: 0000000000002590 {{.*}} R_390_TLS_DTPMOD 0000000000000010 c + 0 |
| 28 | +# GD-REL-NEXT: 0000000000002598 {{.*}} R_390_TLS_DTPOFF 0000000000000010 c + 0 |
28 | 29 |
|
29 | 30 | ## _GLOBAL_OFFSET_TABLE is at 0x2558
|
30 | 31 | # GD: larl %r12, 0x2558
|
|
80 | 81 |
|
81 | 82 |
|
82 | 83 | # IE-REL: Relocation section '.rela.dyn' at offset {{.*}} contains 2 entries:
|
83 |
| -# IE-REL: 0000000001002430 0000000200000038 R_390_TLS_TPOFF 0000000000000000 b + 0 |
84 |
| -# IE-REL-NEXT: 0000000001002438 0000000300000038 R_390_TLS_TPOFF 0000000000000000 c + 0 |
| 84 | +# IE-REL: 0000000001002500 {{.*}} R_390_TLS_TPOFF 0000000000000000 b + 0 |
| 85 | +# IE-REL-NEXT: 0000000001002508 {{.*}} R_390_TLS_TPOFF 0000000000000000 c + 0 |
| 86 | +## Benign false dependency on __tls_get_offset |
| 87 | +# IE-REL: Relocation section '.rela.plt' at offset {{.*}} contains 1 |
| 88 | +# IE-REL: R_390_JMP_SLOT 0000000000000000 __tls_get_offset |
85 | 89 |
|
86 |
| -## _GLOBAL_OFFSET_TABLE is at 0x1002418 |
87 |
| -# IE: larl %r12, 0x1002418 |
| 90 | +## _GLOBAL_OFFSET_TABLE |
| 91 | +# IE: larl %r12, 0x10024e8 |
88 | 92 |
|
89 |
| -## TP offset of a is at 0x1002340 |
90 |
| -# IE-NEXT: lgrl %r2, 0x1002340 |
| 93 | +## TP offset of a |
| 94 | +# IE-NEXT: lgrl %r2, 0x10023d0 |
91 | 95 | # IE-NEXT: jgnop
|
92 | 96 | # IE-NEXT: lgf %r2, 0(%r2,%r7)
|
93 | 97 |
|
94 |
| -## GOT offset of the TP offset for b is at 0x1002348 |
95 |
| -# IE-NEXT: lgrl %r2, 0x1002348 |
| 98 | +## GOT offset of the TP offset for b |
| 99 | +# IE-NEXT: lgrl %r2, 0x10023d8 |
96 | 100 | # IE-NEXT: lg %r2, 0(%r2,%r12)
|
97 | 101 | # IE-NEXT: lgf %r2, 0(%r2,%r7)
|
98 | 102 |
|
99 |
| -## GOT offset of the TP offset for c is at 0x1002350 |
100 |
| -# IE-NEXT: lgrl %r2, 0x1002350 |
| 103 | +## GOT offset of the TP offset for c |
| 104 | +# IE-NEXT: lgrl %r2, 0x10023e0 |
101 | 105 | # IE-NEXT: lg %r2, 0(%r2,%r12)
|
102 | 106 | # IE-NEXT: lgf %r2, 0(%r2,%r7)
|
103 | 107 |
|
104 | 108 | ## TP offsets (a) / GOT offset of TP offsets (b, c)
|
105 | 109 | # a: -4
|
106 |
| -# b: 0x1002430 / 0x18 |
107 |
| -# c: 0x1002438 / 0x20 |
108 |
| -# IE-DATA: 1002340 ffffffff fffffffc 00000000 00000018 |
109 |
| -# IE-DATA-NEXT: 1002350 00000000 00000020 |
| 110 | +# b: 0x10023d0 / 0x18 |
| 111 | +# c: 0x10023e0 / 0x20 |
| 112 | +# IE-DATA: 10023d0 ffffffff fffffffc 00000000 00000018 |
| 113 | +# IE-DATA-NEXT: 10023e0 00000000 00000020 |
110 | 114 |
|
111 | 115 |
|
112 | 116 | ear %r7,%a0
|
|
0 commit comments