;;; TOOL: run-wasm-link ;;; FLAGS: --debug-names -r (module (import "__extern" "missing0" (func $import_func0)) (import "__extern" "missing1" (func)) (import "__extern" "baz" (func $import_func1)) (import "__extern" "missing2" (func $import_func2)) (export "foo" (func $name1)) (func $name1 (param $param1 i32) i32.const 1 call 2) (func $name2 (param $param2 i64) i64.const 1 call 3) (func (param $param2 i64)) ) (module (export "baz" (func 0)) (func $name3 (param $param3 i32) i32.const 2 call 0) ) (;; STDOUT ;;; linked.wasm: file format wasm 0x1 Sections: Type start=0x0000000a end=0x0000001a (size=0x00000010) count: 4 Import start=0x00000020 end=0x0000005d (size=0x0000003d) count: 3 Function start=0x00000063 end=0x00000068 (size=0x00000005) count: 4 Export start=0x0000006e end=0x0000007b (size=0x0000000d) count: 2 Code start=0x0000007d end=0x000000a2 (size=0x00000025) count: 4 Custom start=0x000000a8 end=0x000000ea (size=0x00000042) "name" Custom start=0x000000f0 end=0x00000106 (size=0x00000016) "reloc.Code" Section Details: Type: - [0] () -> nil - [1] (i32) -> nil - [2] (i64) -> nil - [3] (i32) -> nil Import: - func[0] sig=0 <- __extern.missing0 - func[1] sig=0 <- __extern.missing1 - func[2] sig=0 <- __extern.missing2 Function: - func[3] sig=1 - func[4] sig=2 - func[5] sig=2 - func[6] sig=3 Export: - func[3] <$name1> -> "foo" - func[6] <$name3> -> "baz" Custom: - name: "name" - func[0] $import_func0 - func[2] $import_func2 - func[3] $name1 - func[4] $name2 - func[6] $name3 Custom: - name: "reloc.Code" - section: Code - R_FUNC_INDEX_LEB offset=0x000006(file=0x000083) index=0x000006 - R_FUNC_INDEX_LEB offset=0x000011(file=0x00008e) index=0x000002 - R_FUNC_INDEX_LEB offset=0x00001f(file=0x00009c) index=0x000006 Code Disassembly: 00007e <$name1>: 000080: 41 01 | i32.const 0x1 000082: 10 86 80 80 80 00 | call 0x6 000083: R_FUNC_INDEX_LEB 6 <$name3> 000088: 0b | end 000089 <$name2>: 00008b: 42 01 | i64.const 1 00008d: 10 82 80 80 80 00 | call 0x2 00008e: R_FUNC_INDEX_LEB 2 <$import_func2> 000093: 0b | end 000094 func[5]: 000096: 0b | end 000097 <$name3>: 000099: 41 02 | i32.const 0x2 00009b: 10 86 80 80 80 00 | call 0x6 00009c: R_FUNC_INDEX_LEB 6 <$name3> 0000a1: 0b | end ;;; STDOUT ;;)