brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1000 B · 211c671 Raw
33 lines · plain
1# REQUIRES: x862# UNSUPPORTED: system-windows3## Test that archive:file is supported in an input section description.4 5# RUN: mkdir -p %t.dir6# RUN: echo '.data; .byte 1' | llvm-mc -filetype=obj -triple=x86_64 - -o %t.dir/a.o7# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.dir/b.o8# RUN: rm -f %t.a9# RUN: llvm-ar rc %t.a %t.dir/a.o %t.dir/b.o10 11## *.a:b.o matches /path/to/input-archive.s.tmp.a:b.o12## *b.o matches /path/to/input-archive.s.tmp.a:b.o13# RUN: echo 'SECTIONS { \14# RUN:   .foo : { "%t.a:a.o"(.data) } \15# RUN:   .bar : { *.a:b.o(.data) } \16# RUN:   .qux : { *b.o(.data1) } \17# RUN:   }' > %t.script18# RUN: ld.lld -T %t.script --whole-archive %t.a -o %t19# RUN: llvm-readelf -x .foo -x .bar -x .qux %t | FileCheck %s20 21# CHECK:      Hex dump of section '.foo':22# CHECK-NEXT: 0x00000000 0123# CHECK:      Hex dump of section '.bar':24# CHECK-NEXT: 0x00000001 0225# CHECK:      Hex dump of section '.qux':26# CHECK-NEXT: 0x00000002 0327 28.data29.byte 230 31.section .data1,"aw",@progbits32.byte 333