36 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o3# RUN: ld.lld %t.o -o %t1 --gc-sections4# RUN: llvm-objdump --section-headers -D %t1 | FileCheck %s5 6## Check that we are able to GC non-allocatable metadata sections without crash.7 8# CHECK: Name Size9# CHECK: .stack_sizes 0000000110 11# CHECK: Disassembly of section .stack_sizes:12# CHECK-EMPTY:13# CHECK-NEXT: <.stack_sizes>:14# CHECK-NEXT: 0115 16.section .text.live,"ax",@progbits17.globl live18live:19 nop20 21.section .stack_sizes,"o",@progbits,.text.live,unique,022.byte 123 24.section .text.dead,"ax",@progbits25.globl dead26dead:27 nop28 29.section .stack_sizes,"o",@progbits,.text.dead,unique,130.byte 231 32.section .text.main,"ax",@progbits33.globl _start34_start:35 callq live@PLT36