Debian Codegraph @

crates/wit-component/tests/components/link-dl-openable-builtin-libdl/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 (import "GOT.mem" "__heap_base" (global $__heap_base (mut i32)))
9 (import "GOT.mem" "__heap_end" (global $__heap_end (mut i32)))
10 (global $errno i32 i32.const 0)
11 (global $heap (mut i32) i32.const 0)
12 (func $start (type 0)
13 global.get $__heap_base
14 global.set $heap
15 )
16 (func $malloc (type 1) (param i32) (result i32)
17 global.get $heap
18 global.get $heap
19 local.get 0
20 i32.add
21 global.set $heap
22 )
23 (func $abort (type 0)
24 unreachable
25 )
26 (export "malloc" (func $malloc))
27 (export "abort" (func $abort))
28 (export "errno" (global $errno))
29 (start $start)
30 )