2 # UNSUPPORTED: system-windows
3 ## Test that archive:file is supported in an input section description.
6 # RUN: echo '.data; .byte 1' | llvm-mc -filetype=obj -triple=x86_64 - -o %t.dir/a.o
7 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.dir/b.o
9 # RUN: llvm-ar rc %t.a %t.dir/a.o %t.dir/b.o
11 ## *.a:b.o matches /path/to/input-archive.s.tmp.a:b.o
12 ## *b.o matches /path/to/input-archive.s.tmp.a:b.o
13 # RUN: echo 'SECTIONS { \
14 # RUN: .foo : { "%t.a:a.o"(.data) } \
15 # RUN: .bar : { *.a:b.o(.data) } \
16 # RUN: .qux : { *b.o(.data1) } \
18 # RUN: ld.lld -T %t.script --whole-archive %t.a -o %t
19 # RUN: llvm-readelf -x .foo -x .bar -x .qux %t | FileCheck %s
21 # CHECK: Hex dump of section '.foo':
22 # CHECK-NEXT: 0x00000000 01
23 # CHECK: Hex dump of section '.bar':
24 # CHECK-NEXT: 0x00000001 02
25 # CHECK: Hex dump of section '.qux':
26 # CHECK-NEXT: 0x00000002 03
31 .section .data1,"aw",@progbits