2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
4 .section .foo,"a",@progbits,unique,1
7 .section .foo,"a",@progbits,unique,2
10 .section .foo,"a",@progbits,unique,3
13 ## We should have 3 instances of orphan section foo.
15 # RUN: ld.lld %t.o -o %t.elf --unique
16 # RUN: llvm-readelf -S %t.elf | FileCheck %s
21 ## Test that --unique does not affect sections specified in output section descriptions.
22 # RUN: echo 'SECTIONS { .foo : { *(.foo) }}' > %t.script
23 # RUN: ld.lld %t.o -o %t2.elf -T %t.script --unique
24 # RUN: llvm-readelf -S %t2.elf | FileCheck --check-prefix SCRIPT %s