aboutsummaryrefslogtreecommitdiff
path: root/lld/test/ELF/linkerscript/align-section.test
blob: 1324be24a932867f53f1ea40f460029d402c67a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# REQUIRES: x86
# RUN: rm -rf %t && split-file %s %t && cd %t

# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux /dev/null -o a.o
# RUN: ld.lld --script a.t a.o -shared

# lld shouldn't crash.

#--- a.t
SECTIONS { .foo : ALIGN(2M) {} }

# RUN: not ld.lld --script b.t 2>&1 | FileCheck %s --match-full-lines --strict-whitespace

# lld should not crash and report the error properly.

# CHECK:{{.*}} error: b.t:3: malformed number: :
# CHECK:>>>   S :ALIGN(4096) {}
# CHECK:>>>     ^

#--- b.t
SECTIONS
{
  S :ALIGN(4096) {}
}