64 lines · plain
1# Simplified version of tls-non-shared-memory.s that does not reference2# __tls_base3 4# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s5 6.section .tdata.tls1,"",@7.globl tls18.p2align 29tls1:10 .int32 4311 .size tls1, 212 13.section .custom_section.target_features,"",@14 .int8 215 .int8 4316 .int8 717 .ascii "atomics"18 .int8 4319 .int8 1120 .ascii "bulk-memory"21 22# RUN: wasm-ld --no-gc-sections --no-entry -o %t.wasm %t.o23# RUN: obj2yaml %t.wasm | FileCheck %s24 25# RUN: wasm-ld --experimental-pic -shared -o %t.so %t.o26# RUN: obj2yaml %t.so | FileCheck %s --check-prefix=PIC27 28# CHECK: - Type: DATA29# CHECK-NEXT: Segments:30# CHECK-NEXT: - SectionOffset: 831# CHECK-NEXT: InitFlags: 032# CHECK-NEXT: Offset:33# CHECK-NEXT: Opcode: I32_CONST34# CHECK-NEXT: Value: 6553635# CHECK-NEXT: Content: 2B00000036# CHECK-NEXT: - Type: CUSTOM37# CHECK-NOT: - Type: IMPORT38 39 40# In PIC mode we expect TLS data and non-TLS data to be merged into41# a single segment which is initialized via the __memory_base import42 43# PIC: - Type: IMPORT44# PIC-NEXT: Imports:45# PIC-NEXT: - Module: env46# PIC-NEXT: Field: memory47# PIC-NEXT: Kind: MEMORY48# PIC-NEXT: Memory:49# PIC-NEXT: Minimum: 0x150# PIC-NEXT: - Module: env51# PIC-NEXT: Field: __memory_base52# PIC-NEXT: Kind: GLOBAL53# PIC-NEXT: GlobalType: I3254 55# PIC: - Type: DATA56# PIC-NEXT: Segments:57# PIC-NEXT: - SectionOffset: 658# PIC-NEXT: InitFlags: 059# PIC-NEXT: Offset:60# PIC-NEXT: Opcode: GLOBAL_GET61# PIC-NEXT: Index: 062# PIC-NEXT: Content: 2B00000063# PIC-NEXT: - Type: CUSTOM64