1# Testing that __tls_size and __tls_align are correctly emitted when there are 2# no thread_local variables. 3 4# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s 5 6.globl _start 7_start: 8 .functype _start () -> () 9 end_function 10 11.section .custom_section.target_features,"",@ 12 .int8 2 13 .int8 43 14 .int8 7 15 .ascii "atomics" 16 .int8 43 17 .int8 11 18 .ascii "bulk-memory" 19 20# RUN: wasm-ld -no-gc-sections --shared-memory --max-memory=131072 --allow-undefined -o %t.wasm %t.o 21# RUN: obj2yaml %t.wasm | FileCheck %s 22# CHECK: - Type: GLOBAL 23# CHECK-NEXT: Globals: 24 25# __stack_pointer 26# CHECK-NEXT: - Index: 0 27# CHECK-NEXT: Type: I32 28# CHECK-NEXT: Mutable: true 29# CHECK-NEXT: InitExpr: 30# CHECK-NEXT: Opcode: I32_CONST 31# CHECK-NEXT: Value: 66576 32 33# __tls_base 34# CHECK-NEXT: - Index: 1 35# CHECK-NEXT: Type: I32 36# CHECK-NEXT: Mutable: true 37# CHECK-NEXT: InitExpr: 38# CHECK-NEXT: Opcode: I32_CONST 39# CHECK-NEXT: Value: 0 40 41# __tls_size 42# CHECK-NEXT: - Index: 2 43# CHECK-NEXT: Type: I32 44# CHECK-NEXT: Mutable: false 45# CHECK-NEXT: InitExpr: 46# CHECK-NEXT: Opcode: I32_CONST 47# CHECK-NEXT: Value: 0 48 49# __tls_align 50# CHECK-NEXT: - Index: 3 51# CHECK-NEXT: Type: I32 52# CHECK-NEXT: Mutable: false 53# CHECK-NEXT: InitExpr: 54# CHECK-NEXT: Opcode: I32_CONST 55# CHECK-NEXT: Value: 0 56