xref: /llvm-project/llvm/test/tools/llvm-objcopy/wasm/strip-all.test (revision 2a6136e552d24b6bf665c42a6e32efc0b2d88fbf)
1## Test that --strip-all removes debug, linking, and producers sections, but not
2## known or unknown-custom sections.
3# RUN: yaml2obj %s -o %t
4# RUN: llvm-objcopy --strip-all %t %t2
5# RUN: obj2yaml %t2 | FileCheck --implicit-check-not=Type: %s
6
7# CHECK:      Sections:
8# CHECK-NEXT:   - Type: TYPE
9# CHECK:        - Type: CUSTOM
10# CHECK-NEXT:        Name: .objcopy.removed
11# CHECK:        - Type: CUSTOM
12# CHECK-NEXT:        Name: .objcopy.removed
13# CHECK:        - Type: CUSTOM
14# CHECK-NEXT:        Name: .objcopy.removed
15# CHECK:        - Type: CUSTOM
16# CHECK-NEXT:        Name: foo
17
18--- !WASM
19FileHeader:
20  Version: 0x00000001
21Sections:
22  - Type: TYPE
23    Signatures:
24      - Index: 0
25        ParamTypes: []
26        ReturnTypes: []
27  - Type: CUSTOM
28    Name: linking
29    Version: 2
30  - Type: CUSTOM
31    Name: producers
32    Tools:
33      - Name:   clang
34        Version: 9.0.0
35  - Type: CUSTOM
36    Name: .debug_info
37    Payload: DEADBEEF
38  - Type: CUSTOM
39    Name: foo
40    Payload: CAFE
41