|
1 | 1 | # REQUIRES: ppc
|
2 | 2 | # RUN: llvm-mc --triple=powerpc64le %s --filetype=obj -o %t1.o
|
3 | 3 | # RUN: llvm-mc --triple=powerpc64 %s --filetype=obj -o %t2.o
|
4 |
| -# RUN: not ld.lld --shared %t1.o -o /dev/null 2>&1 | FileCheck %s |
5 |
| -# RUN: not ld.lld --shared %t2.o -o /dev/null 2>&1 | FileCheck %s |
| 4 | +# RUN: ld.lld --shared --fatal-warnings %t1.o -o /dev/null |
| 5 | +# RUN: ld.lld --shared --fatal-warnings %t2.o -o /dev/null |
6 | 6 |
|
7 |
| -# CHECK: ld.lld: error: call to __tls_get_addr is missing a R_PPC64_TLSGD/R_PPC64_TLSLD relocation |
8 |
| -# CHECK-NEXT: defined in {{.*}}.o |
9 |
| -# CHECK-NEXT: referenced by {{.*}}.o:(.text+0x8) |
10 |
| - |
11 |
| -# CHECK: ld.lld: error: call to __tls_get_addr is missing a R_PPC64_TLSGD/R_PPC64_TLSLD relocation |
12 |
| -# CHECK-NEXT: defined in {{.*}}.o |
13 |
| -# CHECK-NEXT: referenced by {{.*}}.o:(.text+0x18) |
14 |
| - |
15 |
| -# CHECK: ld.lld: error: call to __tls_get_addr is missing a R_PPC64_TLSGD/R_PPC64_TLSLD relocation |
16 |
| -# CHECK-NEXT: defined in {{.*}}.o |
17 |
| -# CHECK-NEXT: referenced by {{.*}}.o:(.text+0x28) |
18 |
| - |
19 |
| -# CHECK: ld.lld: error: call to __tls_get_addr is missing a R_PPC64_TLSGD/R_PPC64_TLSLD relocation |
20 |
| -# CHECK-NEXT: defined in {{.*}}.o |
21 |
| -# CHECK-NEXT: referenced by {{.*}}.o:(.text+0x38) |
22 |
| - |
23 |
| -# CHECK: ld.lld: error: call to __tls_get_addr is missing a R_PPC64_TLSGD/R_PPC64_TLSLD relocation |
24 |
| -# CHECK-NEXT: defined in {{.*}}.o |
25 |
| -# CHECK-NEXT: referenced by {{.*}}.o:(.text+0x40) |
| 7 | +## User code can call __tls_get_addr by specifying the tls_index parameter. |
| 8 | +## We need to allow R_PPC64_REL24/R_PPC64_REL24_NOTOC referencing __tls_get_addr |
| 9 | +## without a pairing R_PPC64_TLSGD/R_PPC64_TLSLD. |
26 | 10 |
|
27 | 11 | GeneralDynamic:
|
28 | 12 | addis 3, 2, x@got@tlsgd@ha
|
|
0 commit comments