[X86][MC,LLD][NFC] Rename R_X86_64_REX2_GOTPCRELX (#116737)
[llvm-project.git] / lld / test / wasm / strip-all.s
blobb0819a29f8028a4a470c44a779cf6ac7384cecd3
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
5 ## Test alias -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
27 .globl _start
28 _start:
29 .functype _start () -> ()
30 end_function
32 .section .custom_section.target_features,"",@
33 .int8 1
34 .int8 43
35 .int8 15
36 .ascii "mutable-globals"