File tree Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -221,3 +221,8 @@ _start:
221
221
# CHECK-COMMON-NEXT: PF_W (0x2)
222
222
# CHECK-COMMON-NEXT: ]
223
223
# CHECK-COMMON-NEXT: Alignment: 0
224
+
225
+ # RUN: not ld.lld -z max-page-size=0x10001 -z common-page-size=0x1001 %t -o /dev/null 2>&1 | FileCheck %s --check-prefix=INVALID
226
+
227
+ # INVALID: error: max-page-size: value isn't a power of 2
228
+ # INVALID-NEXT: error: common-page-size: value isn't a power of 2
Original file line number Diff line number Diff line change 35
35
# RUN: not ld.lld -o /dev/null -T %t.script %t.o 2>&1 | FileCheck --check-prefix=ERR5 %s
36
36
# ERR5: error: memory region 'ram' not declared
37
37
38
+ # RUN: echo 'SECTIONS { .text : { *(.text) } AT> ram }' > %t.script
39
+ # RUN: not ld.lld -o /dev/null -T %t.script %t.o 2>&1 | FileCheck --check-prefix=ERR5 %s
40
+
38
41
## Check region overflow.
39
42
40
43
# RUN: echo 'MEMORY { ram (rwx) : ORIGIN = 0, LENGTH = 2K } \
Original file line number Diff line number Diff line change
1
+ # REQUIRES: x86
2
+
3
+ # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
4
+
5
+ # RUN: not ld.lld --start-group --start-group %t.o 2>&1 | FileCheck %s --check-prefix=NESTED
6
+ # NESTED: nested --start-group
7
+
8
+ # RUN: not ld.lld --end-group 2>&1 | FileCheck %s --check-prefix=END
9
+ # RUN: not ld.lld '-)' 2>&1 | FileCheck %s --check-prefix=END
10
+ # END: stray --end-group
11
+
12
+ .globl _start
13
+ _start:
Original file line number Diff line number Diff line change 31
31
# RUN: echo 'GROUP("%t2.a" "%t1.o")' > %t2.lds
32
32
# RUN: ld.lld --fatal-warnings --warn-backrefs %t2.lds -o /dev/null
33
33
# RUN: ld.lld --fatal-warnings --warn-backrefs '-(' %t2.a %t1.o '-)' -o /dev/null
34
+ # RUN: ld.lld --fatal-warnings --warn-backrefs --start-group %t2.a %t1.o --end-group -o /dev/null
34
35
35
36
## A backward reference from %t1.o to %t2.a (added by %t3.lds).
36
37
# RUN: echo 'GROUP("%t2.a")' > %t3.lds
You can’t perform that action at this time.
0 commit comments