Skip to content

Commit c2a5459

Browse files
committed
[ELF][AArch64] Improve some aarch64-*.s tests
* Delete aarch64-tls-static.s: it is covered by aarch64-tlsdesc.c * Add --no-show-raw-insn to llvm-objdump -d tests * When linking an executable with %t.so, the path %t.so will be recorded in the DT_NEEDED entry if %t.so doesn't have DT_SONAME. The DT_NEEDED has varying lengths on different systems. Add -soname to make tests more robust. This issue will become outstanding if we allow overlapping PT_LOAD (D64930). llvm-svn: 366532
1 parent c5ecdd3 commit c2a5459

13 files changed

+188
-244
lines changed

lld/test/ELF/aarch64-condb-reloc.s

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# REQUIRES: aarch64
2-
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %p/Inputs/aarch64-condb-reloc.s -o %t1
3-
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %t2
4-
# RUN: ld.lld %t1 %t2 -o %t
5-
# RUN: llvm-objdump -d %t | FileCheck %s
6-
# RUN: ld.lld -shared %t1 %t2 -o %t3
7-
# RUN: llvm-objdump -d %t3 | FileCheck -check-prefix=DSO %s
2+
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %p/Inputs/aarch64-condb-reloc.s -o %t1.o
3+
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %t2.o
4+
# RUN: ld.lld %t1.o %t2.o -o %t
5+
# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
6+
# RUN: ld.lld -shared %t1.o %t2.o -o %t.so
7+
# RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck -check-prefix=DSO %s
88
# RUN: llvm-readobj -S -r %t3 | FileCheck -check-prefix=DSOREL %s
99

1010
# 0x11024 - 36 = 0x11000
@@ -13,21 +13,21 @@
1313
# CHECK: Disassembly of section .text:
1414
# CHECK-EMPTY:
1515
# CHECK-NEXT: _foo:
16-
# CHECK-NEXT: 210000: {{.*}} nop
17-
# CHECK-NEXT: 210004: {{.*}} nop
18-
# CHECK-NEXT: 210008: {{.*}} nop
19-
# CHECK-NEXT: 21000c: {{.*}} nop
16+
# CHECK-NEXT: 210000: nop
17+
# CHECK-NEXT: 210004: nop
18+
# CHECK-NEXT: 210008: nop
19+
# CHECK-NEXT: 21000c: nop
2020
# CHECK: _bar:
21-
# CHECK-NEXT: 210010: {{.*}} nop
22-
# CHECK-NEXT: 210014: {{.*}} nop
23-
# CHECK-NEXT: 210018: {{.*}} nop
21+
# CHECK-NEXT: 210010: nop
22+
# CHECK-NEXT: 210014: nop
23+
# CHECK-NEXT: 210018: nop
2424
# CHECK: _dah:
25-
# CHECK-NEXT: 21001c: {{.*}} nop
26-
# CHECK-NEXT: 210020: {{.*}} nop
25+
# CHECK-NEXT: 21001c: nop
26+
# CHECK-NEXT: 210020: nop
2727
# CHECK: _start:
28-
# CHECK-NEXT: 210024: {{.*}} b.eq #-36
29-
# CHECK-NEXT: 210028: {{.*}} b.eq #-24
30-
# CHECK-NEXT: 21002c: {{.*}} b.eq #-16
28+
# CHECK-NEXT: 210024: b.eq #-36 <_foo>
29+
# CHECK-NEXT: 210028: b.eq #-24 <_bar>
30+
# CHECK-NEXT: 21002c: b.eq #-16 <_dah>
3131

3232
#DSOREL: Section {
3333
#DSOREL: Index:
@@ -56,51 +56,51 @@
5656
#DSO: Disassembly of section .text:
5757
#DSO-EMPTY:
5858
#DSO-NEXT: _foo:
59-
#DSO-NEXT: 10000: {{.*}} nop
60-
#DSO-NEXT: 10004: {{.*}} nop
61-
#DSO-NEXT: 10008: {{.*}} nop
62-
#DSO-NEXT: 1000c: {{.*}} nop
59+
#DSO-NEXT: 10000: nop
60+
#DSO-NEXT: 10004: nop
61+
#DSO-NEXT: 10008: nop
62+
#DSO-NEXT: 1000c: nop
6363
#DSO: _bar:
64-
#DSO-NEXT: 10010: {{.*}} nop
65-
#DSO-NEXT: 10014: {{.*}} nop
66-
#DSO-NEXT: 10018: {{.*}} nop
64+
#DSO-NEXT: 10010: nop
65+
#DSO-NEXT: 10014: nop
66+
#DSO-NEXT: 10018: nop
6767
#DSO: _dah:
68-
#DSO-NEXT: 1001c: {{.*}} nop
69-
#DSO-NEXT: 10020: {{.*}} nop
68+
#DSO-NEXT: 1001c: nop
69+
#DSO-NEXT: 10020: nop
7070
#DSO: _start:
71-
#DSO-NEXT: 10024: {{.*}} b.eq #44
72-
#DSO-NEXT: 10028: {{.*}} b.eq #56
73-
#DSO-NEXT: 1002c: {{.*}} b.eq #68
71+
#DSO-NEXT: 10024: b.eq #44 <_foo@plt>
72+
#DSO-NEXT: 10028: b.eq #56 <_bar@plt>
73+
#DSO-NEXT: 1002c: b.eq #68 <_dah@plt>
7474
#DSO-EMPTY:
7575
#DSO-NEXT: Disassembly of section .plt:
7676
#DSO-EMPTY:
7777
#DSO-NEXT: .plt:
78-
#DSO-NEXT: 10030: {{.*}} stp x16, x30, [sp, #-16]!
79-
#DSO-NEXT: 10034: {{.*}} adrp x16, #131072
80-
#DSO-NEXT: 10038: {{.*}} ldr x17, [x16, #16]
81-
#DSO-NEXT: 1003c: {{.*}} add x16, x16, #16
82-
#DSO-NEXT: 10040: {{.*}} br x17
83-
#DSO-NEXT: 10044: {{.*}} nop
84-
#DSO-NEXT: 10048: {{.*}} nop
85-
#DSO-NEXT: 1004c: {{.*}} nop
78+
#DSO-NEXT: 10030: stp x16, x30, [sp, #-16]!
79+
#DSO-NEXT: 10034: adrp x16, #131072
80+
#DSO-NEXT: 10038: ldr x17, [x16, #16]
81+
#DSO-NEXT: 1003c: add x16, x16, #16
82+
#DSO-NEXT: 10040: br x17
83+
#DSO-NEXT: 10044: nop
84+
#DSO-NEXT: 10048: nop
85+
#DSO-NEXT: 1004c: nop
8686
#DSO-EMPTY:
8787
#DSO-NEXT: _foo@plt:
88-
#DSO-NEXT: 10050: {{.*}} adrp x16, #131072
89-
#DSO-NEXT: 10054: {{.*}} ldr x17, [x16, #24]
90-
#DSO-NEXT: 10058: {{.*}} add x16, x16, #24
91-
#DSO-NEXT: 1005c: {{.*}} br x17
88+
#DSO-NEXT: 10050: adrp x16, #131072
89+
#DSO-NEXT: 10054: ldr x17, [x16, #24]
90+
#DSO-NEXT: 10058: add x16, x16, #24
91+
#DSO-NEXT: 1005c: br x17
9292
#DSO-EMPTY:
9393
#DSO-NEXT: _bar@plt:
94-
#DSO-NEXT: 10060: {{.*}} adrp x16, #131072
95-
#DSO-NEXT: 10064: {{.*}} ldr x17, [x16, #32]
96-
#DSO-NEXT: 10068: {{.*}} add x16, x16, #32
97-
#DSO-NEXT: 1006c: {{.*}} br x17
94+
#DSO-NEXT: 10060: adrp x16, #131072
95+
#DSO-NEXT: 10064: ldr x17, [x16, #32]
96+
#DSO-NEXT: 10068: add x16, x16, #32
97+
#DSO-NEXT: 1006c: br x17
9898
#DSO-EMPTY:
9999
#DSO-NEXT: _dah@plt:
100-
#DSO-NEXT: 10070: {{.*}} adrp x16, #131072
101-
#DSO-NEXT: 10074: {{.*}} ldr x17, [x16, #40]
102-
#DSO-NEXT: 10078: {{.*}} add x16, x16, #40
103-
#DSO-NEXT: 1007c: {{.*}} br x17
100+
#DSO-NEXT: 10070: adrp x16, #131072
101+
#DSO-NEXT: 10074: ldr x17, [x16, #40]
102+
#DSO-NEXT: 10078: add x16, x16, #40
103+
#DSO-NEXT: 1007c: br x17
104104

105105
.globl _start
106106
_start:

lld/test/ELF/aarch64-copy.s

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t.o
33
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %p/Inputs/relocation-copy.s -o %t2.o
44
// RUN: ld.lld -shared %t2.o -soname fixed-length-string.so -o %t2.so
5-
// RUN: ld.lld %t.o %t2.so -o %t3
6-
// RUN: llvm-readobj -S -r --expand-relocs --symbols %t3 | FileCheck %s
7-
// RUN: llvm-objdump -d %t3 | FileCheck -check-prefix=CODE %s
8-
// RUN: llvm-objdump -s -section=.rodata %t3 | FileCheck -check-prefix=RODATA %s
5+
// RUN: ld.lld %t.o %t2.so -o %t
6+
// RUN: llvm-readobj -S -r --symbols %t | FileCheck %s
7+
// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck -check-prefix=CODE %s
8+
// RUN: llvm-objdump -s -section=.rodata %t | FileCheck -check-prefix=RODATA %s
99

1010
.text
1111
.globl _start
@@ -31,24 +31,9 @@ _start:
3131

3232
// CHECK: Relocations [
3333
// CHECK-NEXT: Section ({{.*}}) .rela.dyn {
34-
// CHECK-NEXT: Relocation {
35-
// CHECK-NEXT: Offset: 0x230000
36-
// CHECK-NEXT: Type: R_AARCH64_COPY
37-
// CHECK-NEXT: Symbol: x
38-
// CHECK-NEXT: Addend: 0x0
39-
// CHECK-NEXT: }
40-
// CHECK-NEXT: Relocation {
41-
// CHECK-NEXT: Offset: 0x230010
42-
// CHECK-NEXT: Type: R_AARCH64_COPY
43-
// CHECK-NEXT: Symbol: y
44-
// CHECK-NEXT: Addend: 0x0
45-
// CHECK-NEXT: }
46-
// CHECK-NEXT: Relocation {
47-
// CHECK-NEXT: Offset: 0x230014
48-
// CHECK-NEXT: Type: R_AARCH64_COPY
49-
// CHECK-NEXT: Symbol: z
50-
// CHECK-NEXT: Addend: 0x0
51-
// CHECK-NEXT: }
34+
// CHECK-NEXT: 0x230000 R_AARCH64_COPY x 0x0
35+
// CHECK-NEXT: 0x230010 R_AARCH64_COPY y 0x0
36+
// CHECK-NEXT: 0x230014 R_AARCH64_COPY z 0x0
5237
// CHECK-NEXT: }
5338
// CHECK-NEXT: ]
5439

@@ -81,13 +66,13 @@ _start:
8166
// CODE-NEXT: _start:
8267
// S(x) = 0x230000, A = 0, P = 0x210000
8368
// S + A - P = 0x20000 = 131072
84-
// CODE-NEXT: 210000: {{.*}} adr x1, #131072
69+
// CODE-NEXT: 210000: adr x1, #131072
8570
// S(y) = 0x230010, A = 0, P = 0x210004
8671
// Page(S + A) - Page(P) = 0x230000 - 0x210000 = 0x20000 = 131072
87-
// CODE-NEXT: 210004: {{.*}} adrp x2, #131072
72+
// CODE-NEXT: 210004: adrp x2, #131072
8873
// S(y) = 0x230010, A = 0
8974
// (S + A) & 0xFFF = 0x10 = 16
90-
// CODE-NEXT: 210008: {{.*}} add x2, x2, #16
75+
// CODE-NEXT: 210008: add x2, x2, #16
9176

9277
// RODATA: Contents of section .rodata:
9378
// S(z) = 0x230014

lld/test/ELF/aarch64-gnu-ifunc-plt.s

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// REQUIRES: aarch64
22
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %S/Inputs/shared2.s -o %t1.o
3-
// RUN: ld.lld %t1.o --shared -o %t.so
3+
// RUN: ld.lld %t1.o --shared --soname=t.so -o %t.so
44
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
55
// RUN: ld.lld --hash-style=sysv %t.so %t.o -o %tout
6-
// RUN: llvm-objdump -d %tout | FileCheck %s --check-prefix=DISASM
6+
// RUN: llvm-objdump -d --no-show-raw-insn %tout | FileCheck %s --check-prefix=DISASM
77
// RUN: llvm-objdump -s %tout | FileCheck %s --check-prefix=GOTPLT
88
// RUN: llvm-readobj -r --dynamic-table %tout | FileCheck %s
99

@@ -32,46 +32,46 @@
3232
// DISASM: Disassembly of section .text:
3333
// DISASM-EMPTY:
3434
// DISASM-NEXT: foo:
35-
// DISASM-NEXT: 210000: {{.*}} ret
35+
// DISASM-NEXT: 210000: ret
3636
// DISASM: bar:
37-
// DISASM-NEXT: 210004: {{.*}} ret
37+
// DISASM-NEXT: 210004: ret
3838
// DISASM: _start:
39-
// DISASM-NEXT: 210008: {{.*}} bl #88
40-
// DISASM-NEXT: 21000c: {{.*}} bl #100
41-
// DISASM-NEXT: 210010: {{.*}} bl #48
42-
// DISASM-NEXT: 210014: {{.*}} bl #60
39+
// DISASM-NEXT: 210008: bl #88
40+
// DISASM-NEXT: 21000c: bl #100
41+
// DISASM-NEXT: 210010: bl #48
42+
// DISASM-NEXT: 210014: bl #60
4343
// DISASM-EMPTY:
4444
// DISASM-NEXT: Disassembly of section .plt:
4545
// DISASM-EMPTY:
4646
// DISASM-NEXT: .plt:
47-
// DISASM-NEXT: 210020: {{.*}} stp x16, x30, [sp, #-16]!
48-
// DISASM-NEXT: 210024: {{.*}} adrp x16, #131072
49-
// DISASM-NEXT: 210028: {{.*}} ldr x17, [x16, #16]
50-
// DISASM-NEXT: 21002c: {{.*}} add x16, x16, #16
51-
// DISASM-NEXT: 210030: {{.*}} br x17
52-
// DISASM-NEXT: 210034: {{.*}} nop
53-
// DISASM-NEXT: 210038: {{.*}} nop
54-
// DISASM-NEXT: 21003c: {{.*}} nop
47+
// DISASM-NEXT: 210020: stp x16, x30, [sp, #-16]!
48+
// DISASM-NEXT: 210024: adrp x16, #131072
49+
// DISASM-NEXT: 210028: ldr x17, [x16, #16]
50+
// DISASM-NEXT: 21002c: add x16, x16, #16
51+
// DISASM-NEXT: 210030: br x17
52+
// DISASM-NEXT: 210034: nop
53+
// DISASM-NEXT: 210038: nop
54+
// DISASM-NEXT: 21003c: nop
5555
// DISASM-EMPTY:
5656
// DISASM-NEXT: bar2@plt:
57-
// DISASM-NEXT: 210040: {{.*}} adrp x16, #131072
58-
// DISASM-NEXT: 210044: {{.*}} ldr x17, [x16, #24]
59-
// DISASM-NEXT: 210048: {{.*}} add x16, x16, #24
60-
// DISASM-NEXT: 21004c: {{.*}} br x17
57+
// DISASM-NEXT: 210040: adrp x16, #131072
58+
// DISASM-NEXT: 210044: ldr x17, [x16, #24]
59+
// DISASM-NEXT: 210048: add x16, x16, #24
60+
// DISASM-NEXT: 21004c: br x17
6161
// DISASM-EMPTY:
6262
// DISASM-NEXT: zed2@plt:
63-
// DISASM-NEXT: 210050: {{.*}} adrp x16, #131072
64-
// DISASM-NEXT: 210054: {{.*}} ldr x17, [x16, #32]
65-
// DISASM-NEXT: 210058: {{.*}} add x16, x16, #32
66-
// DISASM-NEXT: 21005c: {{.*}} br x17
67-
// DISASM-NEXT: 210060: {{.*}} adrp x16, #131072
68-
// DISASM-NEXT: 210064: {{.*}} ldr x17, [x16, #40]
69-
// DISASM-NEXT: 210068: {{.*}} add x16, x16, #40
70-
// DISASM-NEXT: 21006c: {{.*}} br x17
71-
// DISASM-NEXT: 210070: {{.*}} adrp x16, #131072
72-
// DISASM-NEXT: 210074: {{.*}} ldr x17, [x16, #48]
73-
// DISASM-NEXT: 210078: {{.*}} add x16, x16, #48
74-
// DISASM-NEXT: 21007c: {{.*}} br x17
63+
// DISASM-NEXT: 210050: adrp x16, #131072
64+
// DISASM-NEXT: 210054: ldr x17, [x16, #32]
65+
// DISASM-NEXT: 210058: add x16, x16, #32
66+
// DISASM-NEXT: 21005c: br x17
67+
// DISASM-NEXT: 210060: adrp x16, #131072
68+
// DISASM-NEXT: 210064: ldr x17, [x16, #40]
69+
// DISASM-NEXT: 210068: add x16, x16, #40
70+
// DISASM-NEXT: 21006c: br x17
71+
// DISASM-NEXT: 210070: adrp x16, #131072
72+
// DISASM-NEXT: 210074: ldr x17, [x16, #48]
73+
// DISASM-NEXT: 210078: add x16, x16, #48
74+
// DISASM-NEXT: 21007c: br x17
7575

7676
.text
7777
.type foo STT_GNU_IFUNC

lld/test/ELF/aarch64-gnu-ifunc2.s

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# REQUIRES: aarch64
22
# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o
3-
# RUN: ld.lld -static %t.o -o %tout
4-
# RUN: llvm-objdump -D %tout | FileCheck %s
5-
# RUN: llvm-readobj -r %tout | FileCheck %s --check-prefix=RELOC
3+
# RUN: ld.lld %t.o -o %t
4+
# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
5+
# RUN: llvm-readelf -S %t | FileCheck %s --check-prefix=SEC
6+
# RUN: llvm-readobj -r %t | FileCheck %s --check-prefix=RELOC
67

78
# CHECK: Disassembly of section .text:
89
# CHECK-EMPTY:
@@ -11,23 +12,20 @@
1112

1213
# CHECK: main:
1314
# adrp x8, 0x220000, 0x220000 == address in .got.plt
14-
# CHECK-NEXT: 210004: {{.*}} adrp x8, #65536
15-
# CHECK-NEXT: 210008: {{.*}} ldr x8, [x8]
16-
# CHECK-NEXT: 21000c: {{.*}} ret
15+
# CHECK-NEXT: 210004: adrp x8, #65536
16+
# CHECK-NEXT: 210008: ldr x8, [x8]
17+
# CHECK-NEXT: 21000c: ret
1718

1819
# CHECK: Disassembly of section .plt:
1920
# CHECK-EMPTY:
2021
# CHECK-NEXT: .plt:
2122
# adrp x16, 0x220000, 0x220000 == address in .got.plt
22-
# CHECK-NEXT: 210010: {{.*}} adrp x16, #65536
23-
# CHECK-NEXT: 210014: {{.*}} ldr x17, [x16]
24-
# CHECK-NEXT: 210018: {{.*}} add x16, x16, #0
25-
# CHECK-NEXT: 21001c: {{.*}} br x17
23+
# CHECK-NEXT: 210010: adrp x16, #65536
24+
# CHECK-NEXT: 210014: ldr x17, [x16]
25+
# CHECK-NEXT: 210018: add x16, x16, #0
26+
# CHECK-NEXT: 21001c: br x17
2627

27-
# CHECK: Disassembly of section .got.plt:
28-
# CHECK-EMPTY:
29-
# CHECK-NEXT: .got.plt:
30-
# CHECK-NEXT: 220000:
28+
# SEC: .got.plt PROGBITS 0000000000220000 020000 000008 00 WA 0 0 8
3129

3230
# RELOC: Relocations [
3331
# RELOC-NEXT: Section {{.*}} .rela.plt {

lld/test/ELF/aarch64-jump26-thunk.s

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// REQUIRES: aarch64
2-
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %S/Inputs/abs.s -o %tabs
3-
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t
4-
// RUN: ld.lld %t %tabs -o %t2 2>&1
5-
// RUN: llvm-objdump -d -triple=aarch64-pc-freebsd %t2 | FileCheck %s
2+
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %S/Inputs/abs.s -o %tabs.o
3+
// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t.o
4+
// RUN: ld.lld %t.o %tabs.o -o %t
5+
// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
66

77
.text
88
.globl _start
@@ -12,10 +12,10 @@ _start:
1212
// CHECK: Disassembly of section .text:
1313
// CHECK-EMPTY:
1414
// CHECK-NEXT: _start:
15-
// CHECK-NEXT: 210000: 02 00 00 14 b #8
15+
// CHECK-NEXT: 210000: b #8
1616
// CHECK: __AArch64AbsLongThunk_big:
17-
// CHECK-NEXT: 210008: 50 00 00 58 ldr x16, #8
18-
// CHECK-NEXT: 21000c: 00 02 1f d6 br x16
17+
// CHECK-NEXT: 210008: ldr x16, #8
18+
// CHECK-NEXT: 21000c: br x16
1919
// CHECK: $d:
20-
// CHECK-NEXT: 210010: 00 00 00 00 .word 0x00000000
21-
// CHECK-NEXT: 210014: 10 00 00 00 .word 0x00000010
20+
// CHECK-NEXT: 210010: 00 00 00 00 .word 0x00000000
21+
// CHECK-NEXT: 210014: 10 00 00 00 .word 0x00000010

lld/test/ELF/aarch64-nopic-plt.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: aarch64
22
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=aarch64-pc-linux
33
// RUN: llvm-mc %p/Inputs/aarch64-copy2.s -o %t2.o -filetype=obj -triple=aarch64-pc-linux
4-
// RUN: ld.lld %t2.o -o %t2.so -shared
4+
// RUN: ld.lld %t2.o -o %t2.so -shared -soname=t2.so
55
// RUN: ld.lld %t.o %t2.so -o %t
66
// RUN: llvm-readobj --symbols %t | FileCheck %s
77

lld/test/ELF/aarch64-tls-gdie.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: aarch64
22
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=aarch64-pc-linux
33
// RUN: llvm-mc %p/Inputs/aarch64-tls-gdie.s -o %t2.o -filetype=obj -triple=aarch64-pc-linux
4-
// RUN: ld.lld %t2.o -o %t2.so -shared
4+
// RUN: ld.lld %t2.o -o %t2.so -shared -soname=t2.so
55
// RUN: ld.lld --hash-style=sysv %t.o %t2.so -o %t
66
// RUN: llvm-readobj -S %t | FileCheck --check-prefix=SEC %s
77
// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s

lld/test/ELF/aarch64-tls-gdle.s

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@
1010
# RELOC-NEXT: ]
1111

1212
# TCB size = 0x16 and foo is first element from TLS register.
13-
# CHECK: Disassembly of section .text:
14-
# CHECK-EMPTY:
15-
# CHECK: _start:
16-
# CHECK: 210000: movz x0, #0, lsl #16
17-
# CHECK: 210004: movk x0, #16
18-
# CHECK: 210008: nop
19-
# CHECK: 21000c: nop
13+
# CHECK-LABEL: _start:
14+
# CHECK-NEXT: 210000: movz x0, #0, lsl #16
15+
# CHECK-NEXT: 210004: movk x0, #16
16+
# CHECK-NEXT: 210008: nop
17+
# CHECK-NEXT: 21000c: nop
2018

2119
.globl _start
2220
_start:

0 commit comments

Comments
 (0)