1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3# RUN: echo "MEMORY { name : ORIGIN = DATA_SEGMENT_RELRO_END; }" > %t.script
4# RUN: not ld.lld -shared -o %t2 --script %t.script %t 2>&1 | FileCheck %s
5# CHECK: error: {{.*}}.script:1: unable to calculate page size
6
7# RUN: echo "MEMORY { name : ORIGIN = CONSTANT(COMMONPAGESIZE); }" > %t.script
8# RUN: not ld.lld -shared -o %t2 --script %t.script %t 2>&1 |\
9# RUN:   FileCheck %s --check-prefix=ERR2
10# ERR2: error: {{.*}}.script:1: unable to calculate page size
11
12# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
13# RUN: echo "MEMORY { name : ORIGIN = .; }" > %t.script
14# RUN: not ld.lld -shared -o %t2 --script %t.script %t 2>&1 |\
15# RUN:   FileCheck %s --check-prefix=ERR3
16# ERR3: error: {{.*}}.script:1: unable to get location counter value
17