1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
3 .globaltype __tls_base, i32
4 .globaltype __tls_align, i32, immutable
8 .functype tls1_addr () -> (i32)
16 .functype tls2_addr () -> (i32)
24 .functype tls_align () -> (i32)
25 global.get __tls_align
28 .section .bss.no_tls,"",@
35 .section .tdata.tls1,"",@
42 .section .tdata.tls2,"",@
49 .section .custom_section.target_features,"",@
58 # RUN: wasm-ld -no-gc-sections --shared-memory --max-memory=131072 --no-entry -o %t.wasm %t.o
59 # RUN: obj2yaml %t.wasm | FileCheck %s
61 # CHECK: - Type: GLOBAL
62 # CHECK-NEXT: Globals:
63 # CHECK-NEXT: - Index: 0
64 # CHECK-NEXT: Type: I32
65 # CHECK-NEXT: Mutable: true
66 # CHECK-NEXT: InitExpr:
67 # CHECK-NEXT: Opcode: I32_CONST
68 # CHECK-NEXT: Value: 66592
71 # CHECK-NEXT: - Index: 1
72 # CHECK-NEXT: Type: I32
73 # CHECK-NEXT: Mutable: true
74 # CHECK-NEXT: InitExpr:
75 # CHECK-NEXT: Opcode: I32_CONST
76 # CHECK-NEXT: Value: 0
79 # CHECK-NEXT: - Index: 2
80 # CHECK-NEXT: Type: I32
81 # CHECK-NEXT: Mutable: false
82 # CHECK-NEXT: InitExpr:
83 # CHECK-NEXT: Opcode: I32_CONST
84 # CHECK-NEXT: Value: 20
87 # CHECK-NEXT: - Index: 3
88 # CHECK-NEXT: Type: I32
89 # CHECK-NEXT: Mutable: false
90 # CHECK-NEXT: InitExpr:
91 # CHECK-NEXT: Opcode: I32_CONST
92 # CHECK-NEXT: Value: 16