1# REQUIRES: x86 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 5 6## Check that we are able to GC non-allocatable metadata sections without crash. 7 8# CHECK: Disassembly of section .stack_sizes: 9# CHECK-NEXT: .stack_sizes: 10# CHECK-NEXT: 01 11 12# CHECK: Name Size 13# CHECK: .stack_sizes 00000001 14 15.section .text.live,"ax",@progbits 16.globl live 17live: 18 nop 19 20.section .stack_sizes,"o",@progbits,.text.live,unique,0 21.byte 1 22 23.section .text.dead,"ax",@progbits 24.globl dead 25dead: 26 nop 27 28.section .stack_sizes,"o",@progbits,.text.dead,unique,1 29.byte 2 30 31.section .text.main,"ax",@progbits 32.globl _start 33_start: 34 callq live@PLT 35