[ELF] Make section member orders consistent
[llvm-project.git] / lld / test / ELF / gc-sections-strip-debug.s
blobe7a5fc0bbf503321cb6034d55c0fe8bde3b54d9d
1 # REQUIRES: x86
2 ## Test that we don't strip SHF_ALLOC .debug* or crash (PR48071
3 ## mark liveness of a merge section which has not been split).
5 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
6 # RUN: ld.lld %t.o --gc-sections --strip-debug -o %t
7 # RUN: llvm-readelf -S %t | FileCheck %s
9 # CHECK: .debug_gdb_scripts
11 .globl _start
12 _start:
13 leaq .L.str(%rip), %rax
15 .section .debug_gdb_scripts,"aMS",@progbits,1
16 .L.str:
17 .asciz "Rust uses SHF_ALLOC .debug_gdb_scripts"