27 lines · plain
1## Test that --keep-section keeps a debug section when stripping.2# RUN: yaml2obj %s -o %t3# RUN: llvm-objcopy --strip-all --keep-section=.debug_info %t %t24# RUN: obj2yaml %t2 | FileCheck --implicit-check-not linking %s5 6# CHECK: Sections:7# CHECK: Name: .debug_info8# CHECK-NEXT: Payload: DEADBEEF9 10## Test that keep overrides an explicit removal.11# RUN: llvm-objcopy --remove-section=.debug_info --keep-section=.debug_info %t %t212# RUN: obj2yaml %t2 | FileCheck %s --check-prefix=KEEP13 14# KEEP: Sections:15# KEEP: Name: .debug_info16 17--- !WASM18FileHeader:19 Version: 0x0000000120Sections:21 - Type: CUSTOM22 Name: linking23 Version: 224 - Type: CUSTOM25 Name: .debug_info26 Payload: DEADBEEF27