Skip to content

Commit d3e79e4

Browse files
committed
[ELF] Improve wildcard test
1 parent 5ff3f66 commit d3e79e4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lld/test/ELF/linkerscript/wildcards.s

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# REQUIRES: x86
22
# RUN: rm -rf %t && split-file %s %t && cd %t
3-
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t/asm -o a.o
3+
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux asm -o a.o
44

55
## Default case: abc and abx included in text.
66
# RUN: echo "SECTIONS { \
7-
# RUN: .text : { *(.abc .abx) } }" > %t.script
8-
# RUN: ld.lld -o out --script %t.script a.o
7+
# RUN: .text : { *(.abc .abx) } }" > a.t
8+
# RUN: ld.lld -o out --script a.t a.o
99
# RUN: llvm-objdump --section-headers out | \
1010
# RUN: FileCheck -check-prefix=SEC-DEFAULT %s
1111
# SEC-DEFAULT: Sections:
@@ -22,15 +22,15 @@
2222

2323
## Now replace the symbol with '?' and check that results are the same.
2424
# RUN: echo "SECTIONS { \
25-
# RUN: .text : { *(.abc .ab?) } }" > %t.script
26-
# RUN: ld.lld -o out --script %t.script a.o
25+
# RUN: .text : { *(.abc .ab?) } }" > b.t
26+
# RUN: ld.lld -o out -T b.t a.o
2727
# RUN: llvm-objdump --section-headers out | \
2828
# RUN: FileCheck -check-prefix=SEC-DEFAULT %s
2929

3030
## Now see how replacing '?' with '*' will consume whole abcd.
3131
# RUN: echo "SECTIONS { \
32-
# RUN: .text : { *(.abc .ab*) } }" > %t.script
33-
# RUN: ld.lld -o out --script %t.script a.o
32+
# RUN: .text : { *(.abc .ab*) } }" > c.t
33+
# RUN: ld.lld -o out --script c.t a.o
3434
# RUN: llvm-objdump --section-headers out | \
3535
# RUN: FileCheck -check-prefix=SEC-ALL %s
3636
# SEC-ALL: Sections:
@@ -46,8 +46,8 @@
4646

4747
## All sections started with .a are merged.
4848
# RUN: echo "SECTIONS { \
49-
# RUN: .text : { *(.a*) } }" > %t.script
50-
# RUN: ld.lld -o out --script %t.script a.o
49+
# RUN: .text : { *(.a*) } }" > d.t
50+
# RUN: ld.lld -o out --script d.t a.o
5151
# RUN: llvm-objdump --section-headers out | \
5252
# RUN: FileCheck -check-prefix=SEC-NO %s
5353
# SEC-NO: Sections:
@@ -114,7 +114,7 @@ SECTIONS {
114114
}
115115

116116
#--- rparen.lds
117-
# RUN: not ld.lld -T rparen.lds %t.o 2>&1 | FileCheck %s --check-prefix=ERR-RPAREN --match-full-lines --strict-whitespace
117+
# RUN: not ld.lld -T rparen.lds a.o 2>&1 | FileCheck %s --check-prefix=ERR-RPAREN --match-full-lines --strict-whitespace
118118
# ERR-RPAREN:{{.*}}: expected filename pattern
119119
# ERR-RPAREN-NEXT:>>> .text : { *(.a* ) ) }
120120
# ERR-RPAREN-NEXT:>>> ^

0 commit comments

Comments
 (0)