37 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.start.o2# RUN: wasm-ld --strip-all -o %t.wasm %t.start.o3# RUN: obj2yaml %t.wasm | FileCheck %s4#5## Test alias -s6# RUN: wasm-ld -s -o %t2.wasm %t.start.o7# RUN: obj2yaml %t2.wasm | FileCheck %s8#9## Check that there is no name section10# CHECK-NOT: Name: name11# CHECK-NOT: Name: target_features12#13## Test --keep-section=name preserver the name section14# RUN: wasm-ld --strip-all --keep-section=name -o %t3.wasm %t.start.o15# RUN: obj2yaml %t3.wasm | FileCheck --check-prefix=CHECK-NAME %s16#17# CHECK-NAME: Name: name18# CHECK-NAME-NOT: Name: target_features19#20## Test --keep-section can be specified more than once21# RUN: wasm-ld --strip-all --keep-section=name --keep-section=target_features -o %t4.wasm %t.start.o22# RUN: obj2yaml %t4.wasm | FileCheck --check-prefix=CHECK-FEATURES %s23#24# CHECK-FEATURES: Name: name25# CHECK-FEATURES: Name: target_features26 27 .globl _start28_start:29 .functype _start () -> ()30 end_function31 32.section .custom_section.target_features,"",@33.int8 134.int8 4335.int8 1536.ascii "mutable-globals"37