;;; 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 (type $t1)
  )
)
(;; STDOUT ;;;

******************************************************************
WARNING: wasm-link is deprecated. Where possible, use lld instead.
******************************************************************

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=0x000000a9 (size=0x00000008) "linking"
   Custom start=0x000000af end=0x000000cb (size=0x0000001c) "reloc.Elem"
   Custom start=0x000000d1 end=0x000000e1 (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 <func1>
 - func[1] sig=2 <func2>
 - func[2] sig=3 <func3>
 - func[3] sig=1 <func4>
Table:
 - table[0] type=anyfunc initial=5 max=5
Elem:
 - segment[0] table=0
 - init i32=0
  - elem[0] = func[0] <func1>
  - elem[1] = func[0] <func1>
  - elem[2] = func[2] <func3>
  - elem[3] = func[1] <func2>
  - elem[4] = func[1] <func2>
Custom:
 - name: "name"
 - func[0] func1
 - func[1] func2
 - func[2] func3
 - func[3] func4
Custom:
 - name: "linking"
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 <func1>:
 00005a: 0b                         | end
00005b <func2>:
 00005d: 0b                         | end
00005e <func3>:
 000060: 0b                         | end
000061 <func4>:
 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 ;;)
