1 # Simplified version of tls-non-shared-memory.s that does not reference
4 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
6 .section .tdata.tls1,"",@
13 .section .custom_section.target_features,"",@
22 # RUN: wasm-ld --no-gc-sections --no-entry -o %t.wasm %t.o
23 # RUN: obj2yaml %t.wasm | FileCheck %s
25 # RUN: wasm-ld --experimental-pic -shared -o %t.so %t.o
26 # RUN: obj2yaml %t.so | FileCheck %s --check-prefix=PIC
29 # CHECK-NEXT: Segments:
30 # CHECK-NEXT: - SectionOffset: 7
31 # CHECK-NEXT: InitFlags: 0
33 # CHECK-NEXT: Opcode: I32_CONST
34 # CHECK-NEXT: Value: 1024
35 # CHECK-NEXT: Content: 2B000000
36 # CHECK-NEXT: - Type: CUSTOM
37 # CHECK-NOT: - Type: IMPORT
40 # In PIC mode we expect TLS data and non-TLS data to be merged into
41 # a single segment which is initialized via the __memory_base import
45 # PIC-NEXT: - Module: env
46 # PIC-NEXT: Field: memory
47 # PIC-NEXT: Kind: MEMORY
49 # PIC-NEXT: Minimum: 0x1
50 # PIC-NEXT: - Module: env
51 # PIC-NEXT: Field: __memory_base
52 # PIC-NEXT: Kind: GLOBAL
53 # PIC-NEXT: GlobalType: I32
57 # PIC-NEXT: - SectionOffset: 6
58 # PIC-NEXT: InitFlags: 0
60 # PIC-NEXT: Opcode: GLOBAL_GET
62 # PIC-NEXT: Content: 2B000000
63 # PIC-NEXT: - Type: CUSTOM