Debian Codegraph @

vendor/wit-component/tests/components/link-dl-openable-builtin-libdl-with-unused/lib-c.wat

raw
1 ;; module name: libc.so
2 (module
3 (@dylink.0
4 (mem-info (memory 0 4))
5 )
6 (type (func))
7 (type (func (param i32) (result i32)))
8 (type (func (param i32 i32 i32) (result i32)))
9 (import "GOT.mem" "__heap_base" (global $__heap_base (mut i32)))
10 (import "GOT.mem" "__heap_end" (global $__heap_end (mut i32)))
11 (global $errno i32 i32.const 0)
12 (global $heap (mut i32) i32.const 0)
13 (func $start (type 0)
14 global.get $__heap_base
15 global.set $heap
16 )
17 (func $malloc (type 1)
18 global.get $heap
19 global.get $heap
20 local.get 0
21 i32.add
22 global.set $heap
23 )
24 (func $memcmp (type 2)
25 unreachable
26 )
27 (func $strlen (type 1)
28 unreachable
29 )
30 (func $abort (type 0)
31 unreachable
32 )
33 (export "malloc" (func $malloc))
34 (export "memcmp" (func $memcmp))
35 (export "strlen" (func $strlen))
36 (export "abort" (func $abort))
37 (export "errno" (global $errno))
38 (start $start)
39 )