23 lines · plain
1# REQUIRES: x862 3# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o4# RUN: ld.lld --gc-sections --print-gc-sections %t.o -o /dev/null | count 05 6.globl _start7_start:8.quad .foo9 10## .foo is retained, so sections linking to it are retained as well.11.section .foo,"a"12.quad 013.section .bar,"ao",@progbits,.foo14.quad 015.section .zed,"ao",@progbits,.foo16.quad 017 18.section .nonalloc19.quad 020 21.section .nonalloc_linkorder,"o",@progbits,.nonalloc22.quad 023