|
1 | 1 | # REQUIRES: x86
|
2 | 2 | # 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 |
4 | 4 |
|
5 | 5 | ## Default case: abc and abx included in text.
|
6 | 6 | # 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 |
9 | 9 | # RUN: llvm-objdump --section-headers out | \
|
10 | 10 | # RUN: FileCheck -check-prefix=SEC-DEFAULT %s
|
11 | 11 | # SEC-DEFAULT: Sections:
|
|
22 | 22 |
|
23 | 23 | ## Now replace the symbol with '?' and check that results are the same.
|
24 | 24 | # 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 |
27 | 27 | # RUN: llvm-objdump --section-headers out | \
|
28 | 28 | # RUN: FileCheck -check-prefix=SEC-DEFAULT %s
|
29 | 29 |
|
30 | 30 | ## Now see how replacing '?' with '*' will consume whole abcd.
|
31 | 31 | # 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 |
34 | 34 | # RUN: llvm-objdump --section-headers out | \
|
35 | 35 | # RUN: FileCheck -check-prefix=SEC-ALL %s
|
36 | 36 | # SEC-ALL: Sections:
|
|
46 | 46 |
|
47 | 47 | ## All sections started with .a are merged.
|
48 | 48 | # 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 |
51 | 51 | # RUN: llvm-objdump --section-headers out | \
|
52 | 52 | # RUN: FileCheck -check-prefix=SEC-NO %s
|
53 | 53 | # SEC-NO: Sections:
|
@@ -114,7 +114,7 @@ SECTIONS {
|
114 | 114 | }
|
115 | 115 |
|
116 | 116 | #--- 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 |
118 | 118 | # ERR-RPAREN:{{.*}}: expected filename pattern
|
119 | 119 | # ERR-RPAREN-NEXT:>>> .text : { *(.a* ) ) }
|
120 | 120 | # ERR-RPAREN-NEXT:>>> ^
|
|
0 commit comments