1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
2 # RUN: wasm-ld --no-check-features -o %t1.wasm %t.o
3 # RUN: obj2yaml %t1.wasm | FileCheck %s
8 .globaltype g1, i64, immutable
10 # Same import module/name/type as `g1`, should be de-duped.
12 .import_module g2, env
14 .globaltype g2, i64, immutable
16 # Imported as an i32 instead of i64, so should not be de-duped.
18 .import_module g3, env
20 .globaltype g3, i32, immutable
22 # Imported as mutable instead of immutable, so should not be de-duped.
24 .import_module g4, env
30 .functype _start () -> ()
42 # CHECK: - Type: IMPORT
43 # CHECK-NEXT: Imports:
44 # CHECK-NEXT: - Module: env
45 # CHECK-NEXT: Field: g
46 # CHECK-NEXT: Kind: GLOBAL
47 # CHECK-NEXT: GlobalType: I64
48 # CHECK-NEXT: GlobalMutable: false
49 # CHECK-NEXT: - Module: env
50 # CHECK-NEXT: Field: g
51 # CHECK-NEXT: Kind: GLOBAL
52 # CHECK-NEXT: GlobalType: I32
53 # CHECK-NEXT: GlobalMutable: false
54 # CHECK-NEXT: - Module: env
55 # CHECK-NEXT: Field: g
56 # CHECK-NEXT: Kind: GLOBAL
57 # CHECK-NEXT: GlobalType: I64
58 # CHECK-NEXT: GlobalMutable: true
62 # CHECK-NEXT: - Index: 0
63 # CHECK-NEXT: Name: g1
64 # CHECK-NEXT: - Index: 1
65 # CHECK-NEXT: Name: g3
66 # CHECK-NEXT: - Index: 2
67 # CHECK-NEXT: Name: g4
68 # CHECK-NEXT: - Index: 3
69 # CHECK-NEXT: Name: __stack_pointer