;;; TOOL: run-wasm-link ;;; FLAGS: -r (module (func $func1 (param i32)) (table anyfunc (elem $func1 $func1)) ) (module (func $func2 (param i64)) (func $func3 (param f64)) (type $t1 (func)) (table anyfunc (elem $func3 $func2 $func2)) (func $func4 i64.const 7 call_indirect $t1 ) ) (;; STDOUT ;;; linked.wasm: file format wasm 0x1 Sections: Type start=0x0000000a end=0x0000001a (size=0x00000010) count: 4 Function start=0x00000020 end=0x00000025 (size=0x00000005) count: 4 Table start=0x0000002b end=0x00000030 (size=0x00000005) count: 1 Elem start=0x00000036 end=0x00000055 (size=0x0000001f) count: 1 Code start=0x00000057 end=0x0000006d (size=0x00000016) count: 4 Custom start=0x00000073 end=0x0000009b (size=0x00000028) "name" Custom start=0x000000a1 end=0x000000b7 (size=0x00000016) "linking" Custom start=0x000000bd end=0x000000d9 (size=0x0000001c) "reloc.Elem" Custom start=0x000000df end=0x000000ef (size=0x00000010) "reloc.Code" Section Details: Type: - type[0] (i32) -> nil - type[1] () -> nil - type[2] (i64) -> nil - type[3] (f64) -> nil Function: - func[0] sig=0 - func[1] sig=2 - func[2] sig=3 - func[3] sig=1 Table: - table[0] type=anyfunc initial=5 max=5 Elem: - segment[0] table=0 - init i32=0 - elem[0] = func[0] - elem[1] = func[0] - elem[2] = func[2] - elem[3] = func[1] - elem[4] = func[1] Custom: - name: "name" - func[0] func1 - func[1] func2 - func[2] func3 - func[3] func4 Custom: - name: "linking" - data size : 0 - data align: 0 Custom: - name: "reloc.Elem" - section: Elem - R_WEBASSEMBLY_FUNCTION_INDEX_LEB offset=0x000006(file=0x00003c) index=0 - R_WEBASSEMBLY_FUNCTION_INDEX_LEB offset=0x00000b(file=0x000041) index=0 - R_WEBASSEMBLY_FUNCTION_INDEX_LEB offset=0x000010(file=0x000046) index=2 - R_WEBASSEMBLY_FUNCTION_INDEX_LEB offset=0x000015(file=0x00004b) index=1 - R_WEBASSEMBLY_FUNCTION_INDEX_LEB offset=0x00001a(file=0x000050) index=1 Custom: - name: "reloc.Code" - section: Code - R_WEBASSEMBLY_TYPE_INDEX_LEB offset=0x00000f(file=0x000066) index=1 Code Disassembly: 000058 : 00005a: 0b | end 00005b : 00005d: 0b | end 00005e : 000060: 0b | end 000061 : 000063: 42 07 | i64.const 7 000065: 11 81 80 80 80 00 00 | call_indirect 1 0 000066: R_WEBASSEMBLY_TYPE_INDEX_LEB 1 00006c: 0b | end ;;; STDOUT ;;)