;;; TOOL: run-wasm-link ;;; FLAGS: --debug-names -r (module (import "__extern" "missing0" (func $import_func0)) (import "_extern1" "missing1" (func)) (import "anything" "baz" (func $import_func1)) (import "extern2" "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=0x0000005c (size=0x0000003c) count: 3 Function start=0x00000062 end=0x00000067 (size=0x00000005) count: 4 Export start=0x0000006d end=0x0000007a (size=0x0000000d) count: 2 Code start=0x0000007c end=0x000000a1 (size=0x00000025) count: 4 Custom start=0x000000a7 end=0x000000e4 (size=0x0000003d) "name" Custom start=0x000000ea end=0x00000100 (size=0x00000016) "linking" Custom start=0x00000106 end=0x0000011c (size=0x00000016) "reloc.Code" Section Details: Type: - type[0] () -> nil - type[1] (i32) -> nil - type[2] (i64) -> nil - type[3] (i32) -> nil Import: - func[0] sig=0 <- __extern.missing0 - func[1] sig=0 <- _extern1.missing1 - func[2] sig=0 <- extern2.missing2 Function: - func[3] sig=1 - func[4] sig=2 - func[5] sig=2 - func[6] sig=3 Export: - func[3] -> "foo" - func[6] -> "baz" Custom: - name: "name" - func[0] import_func0 - func[2] import_func2 - func[3] name1 - func[4] name2 - func[6] name3 Custom: - name: "linking" - data size : 0 - data align: 0 Custom: - name: "reloc.Code" - section: Code - R_WEBASSEMBLY_FUNCTION_INDEX_LEB offset=0x000006(file=0x000082) index=6 - R_WEBASSEMBLY_FUNCTION_INDEX_LEB offset=0x000011(file=0x00008d) index=2 - R_WEBASSEMBLY_FUNCTION_INDEX_LEB offset=0x00001f(file=0x00009b) index=6 Code Disassembly: 00007d : 00007f: 41 01 | i32.const 1 000081: 10 86 80 80 80 00 | call 6 000082: R_WEBASSEMBLY_FUNCTION_INDEX_LEB 6 000087: 0b | end 000088 : 00008a: 42 01 | i64.const 1 00008c: 10 82 80 80 80 00 | call 2 00008d: R_WEBASSEMBLY_FUNCTION_INDEX_LEB 2 000092: 0b | end 000093 func[5]: 000095: 0b | end 000096 : 000098: 41 02 | i32.const 2 00009a: 10 86 80 80 80 00 | call 6 00009b: R_WEBASSEMBLY_FUNCTION_INDEX_LEB 6 0000a0: 0b | end ;;; STDOUT ;;)