1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.start.o
2 # RUN: wasm-ld --strip-all -o %t.wasm %t.start.o
3 # RUN: obj2yaml %t.wasm | FileCheck %s
6 # RUN: wasm-ld -s -o %t2.wasm %t.start.o
7 # RUN: obj2yaml %t2.wasm | FileCheck %s
9 ## Check that there is no name section
10 # CHECK-NOT: Name: name
11 # CHECK-NOT: Name: target_features
13 ## Test --keep-section=name preserver the name section
14 # RUN: wasm-ld --strip-all --keep-section=name -o %t3.wasm %t.start.o
15 # RUN: obj2yaml %t3.wasm | FileCheck --check-prefix=CHECK-NAME %s
17 # CHECK-NAME: Name: name
18 # CHECK-NAME-NOT: Name: target_features
20 ## Test --keep-section can be specified more than once
21 # RUN: wasm-ld --strip-all --keep-section=name --keep-section=target_features -o %t4.wasm %t.start.o
22 # RUN: obj2yaml %t4.wasm | FileCheck --check-prefix=CHECK-FEATURES %s
24 # CHECK-FEATURES: Name: name
25 # CHECK-FEATURES: Name: target_features
29 .functype _start () -> ()
32 .section .custom_section.target_features,"",@
36 .ascii "mutable-globals"