Debian Codegraph @

crates/wit-component/tests/components/link-initialize/lib-c.wat

raw
1 (module
2 (@dylink.0
3 (mem-info (memory 0 4))
4 )
5 (type (func))
6 (type (func (param i32) (result i32)))
7 (import "GOT.mem" "__heap_base" (global $__heap_base (mut i32)))
8 (import "GOT.mem" "__heap_end" (global $__heap_end (mut i32)))
9 (global $heap (mut i32) i32.const 0)
10 (func $start (type 0)
11 global.get $__heap_base
12 global.set $heap
13 )
14 (func $malloc (type 1) (param i32) (result i32)
15 global.get $heap
16 global.get $heap
17 local.get 0
18 i32.add
19 global.set $heap
20 )
21 (func $abort (type 0)
22 unreachable
23 )
24 (export "malloc" (func $malloc))
25 (export "abort" (func $abort))
26 (start $start)
27 )