1# REQUIRES: x86 2 3# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o 4# RUN: ld.lld --gc-sections --print-gc-sections %t.o -o /dev/null | count 0 5 6.globl _start 7_start: 8.quad .foo 9 10## .foo is retained, so sections linking to it are retained as well. 11.section .foo,"a" 12.quad 0 13.section .bar,"ao",@progbits,.foo 14.quad 0 15.section .zed,"ao",@progbits,.foo 16.quad 0 17 18.section .nonalloc 19.quad 0 20 21.section .nonalloc_linkorder,"o",@progbits,.nonalloc 22.quad 0 23