2 # RUN: rm -rf %t && split-file %s %t
3 # RUN: echo '.section .bar, "a"; .quad 1;' | \
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %tfile1.o
5 # RUN: echo '.section .zed, "a"; .quad 2;' | \
6 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %tfile2.o
8 ## We have a file name and no input sections description. In that case, all
9 ## sections from the file specified should be included. Check that.
10 # RUN: ld.lld -o %t/a -T %t/a.t %tfile1.o %tfile2.o
11 # RUN: llvm-objdump -s %t/a | FileCheck %s
13 # CHECK: Contents of section .foo:
14 # CHECK-NEXT: 01000000 00000000 02000000 00000000
16 # RUN: not ld.lld -o /dev/null -T %t/b.t %tfile1.o 2>&1 | FileCheck %s --check-prefix=ERR
17 # RUN: not ld.lld -o /dev/null -T %t/c.t %tfile1.o 2>&1 | FileCheck %s --check-prefix=ERR
18 # RUN: not ld.lld -o /dev/null -T %t/d.t %tfile1.o 2>&1 | FileCheck %s --check-prefix=ERR
20 # ERR: error: {{.*}}.t:1: expected filename pattern
24 .foo : { *file1.o *file2.o }
28 SECTIONS
{ .foo : { (*foo) } }
31 SECTIONS
{ .foo : { (*(foo)) } }
34 SECTIONS
{ .foo : { )(*foo) } }