xref: /llvm-project-15.0.7/lld/test/wasm/tls-export.s (revision 643dfd97)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2# RUN: wasm-ld -shared --experimental-pic -o %t.so %t.o
3# RUN: obj2yaml %t.so | FileCheck %s
4
5.section  .tdata.tls1,"",@
6.globl  tls1
7.p2align  2
8tls1:
9  .int32  1
10  .size tls1, 4
11
12.section  .custom_section.target_features,"",@
13  .int8 3
14  .int8 43
15  .int8 7
16  .ascii  "atomics"
17  .int8 43
18  .int8 11
19  .ascii  "bulk-memory"
20  .int8 43
21  .int8 15
22  .ascii "mutable-globals"
23
24#      CHECK:    ExportInfo:
25# CHECK-NEXT:      - Name:            tls1
26# CHECK-NEXT:        Flags:           [ TLS ]
27# CHECK-NEXT:  - Type:            TYPE
28
29#      CHECK:  - Type:            GLOBAL
30# CHECK-NEXT:    Globals:
31# CHECK-NEXT:      - Index:           2
32# CHECK-NEXT:        Type:            I32
33# CHECK-NEXT:        Mutable:         false
34# CHECK-NEXT:        InitExpr:
35# CHECK-NEXT:          Opcode:          I32_CONST
36# CHECK-NEXT:          Value:           0
37
38#      CHECK:  - Type:            EXPORT
39# CHECK-NEXT:    Exports:
40# CHECK-NEXT:      - Name:            __wasm_call_ctors
41# CHECK-NEXT:        Kind:            FUNCTION
42# CHECK-NEXT:        Index:           0
43# CHECK-NEXT:      - Name:            __wasm_apply_data_relocs
44# CHECK-NEXT:        Kind:            FUNCTION
45# CHECK-NEXT:        Index:           1
46# CHECK-NEXT:      - Name:            tls1
47# CHECK-NEXT:        Kind:            GLOBAL
48# CHECK-NEXT:        Index:           2
49

served by {OpenGrok

Last Index Update: Fri May 15 20:09:11 GMT 2026