File tree Expand file tree Collapse file tree 1 file changed +22
-7
lines changed
lld/test/ELF/linkerscript Expand file tree Collapse file tree 1 file changed +22
-7
lines changed Original file line number Diff line number Diff line change 1
1
# REQUIRES: x86
2
- # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
2
+ # RUN: rm -rf %t && split-file %s %t && cd %t
3
+ # RUN: llvm-mc -filetype=obj -triple=x86_64 a.s -o a.o
3
4
4
- # RUN: echo "INCLUDE \"%t1.script\"" > %t1.script
5
- # RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s
5
+ # RUN: not ld.lld a.o -T 1.lds 2>&1 | FileCheck %s --check-prefix=ERR1
6
+ # ERR1: error: 1.lds:1: there is a cycle in linker script INCLUDEs
6
7
7
- # RUN: echo "INCLUDE \"%t2.script\"" > %t1.script
8
- # RUN: echo "INCLUDE \"%t1.script\"" > %t2.script
9
- # RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s
8
+ # RUN: not ld.lld a.o -T 2a.lds 2>&1 | FileCheck %s --check-prefix=ERR2
9
+ # ERR2: error: 2a.lds:1: there is a cycle in linker script INCLUDEs
10
10
11
- # CHECK: there is a cycle in linker script INCLUDEs
11
+ # RUN: not ld.lld a.o -T 3.lds 2>&1 | FileCheck %s --check-prefix=ERR3
12
+ # ERR3: error: 3.lds:2: there is a cycle in linker script INCLUDEs
12
13
14
+ #--- 0.lds
15
+ BYTE(42 )
16
+ #--- 1.lds
17
+ INCLUDE "1.lds"
18
+ #--- 2a.lds
19
+ INCLUDE "2b.lds"
20
+ #--- 2b.lds
21
+ INCLUDE "2a.lds"
22
+ #--- 3.lds
23
+ SECTIONS {
24
+ foo : { INCLUDE "0.lds" INCLUDE "0.lds" }
25
+ }
26
+
27
+ #--- a.s
13
28
.globl _start
14
29
_start:
15
30
ret
You can’t perform that action at this time.
0 commit comments