1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3# RUN: echo "SECTIONS {" > %t.script
4# RUN: echo ". = 0x20; . = 0x10; .text : {} }" >> %t.script
5# RUN: not ld.lld %t.o --script %t.script -o %t -shared 2>&1 | FileCheck %s
6# CHECK: {{.*}}.script:2: unable to move location counter backward
7
8# RUN: echo "SECTIONS { . = 0x20; . = ASSERT(0x1, "foo"); }" > %t2.script
9# RUN: ld.lld %t.o --script %t2.script -o %t -shared
10