2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 # RUN: ld.lld %t.o -o %t1 --gc-sections
4 # RUN: llvm-objdump --section-headers -D %t1 | FileCheck %s
6 ## Check that we are able to GC non-allocatable metadata sections without crash.
9 # CHECK: .stack_sizes 00000001
11 # CHECK: Disassembly of section .stack_sizes:
13 # CHECK-NEXT: <.stack_sizes>:
16 .section .text.live,"ax",@progbits
21 .section .stack_sizes,"o",@progbits,.text.live,unique,0
24 .section .text.dead,"ax",@progbits
29 .section .stack_sizes,"o",@progbits,.text.dead,unique,1
32 .section .text.main,"ax",@progbits