blob: 4f311a9ff5c656296ac783a9601d7c04a5a3382f [file] [log] [blame] [edit]
;;; TOOL: run-wasm-link
;;; FLAGS:
(module
(export "foo" (func 0))
(func (param i32)
i32.const 1
call 0)
)
(module
(export "bar" (func 0))
(func (param i32)
i32.const 2
call 0)
)
(;; STDOUT ;;;
linked.wasm: file format wasm 0x1
Sections:
Type start=0x0000000a end=0x00000013 (size=0x00000009) count: 2
Function start=0x00000019 end=0x0000001c (size=0x00000003) count: 2
Export start=0x00000022 end=0x0000002f (size=0x0000000d) count: 2
Code start=0x00000031 end=0x00000048 (size=0x00000017) count: 2
Custom start=0x0000004e end=0x00000061 (size=0x00000013) "reloc.Code"
Section Details:
Type:
- [0] (i32) -> nil
- [1] (i32) -> nil
Function:
- func[0] sig=0
- func[1] sig=1
Export:
- func[0] foo
- func[1] bar
Custom:
- name: "reloc.Code"
- section: Code
- R_FUNC_INDEX_LEB offset=0x000006(file=0x000037) index=00000000
- R_FUNC_INDEX_LEB offset=0x000011(file=0x000042) index=0x000001
Code Disassembly:
000032 func[0]:
000034: 41 01 | i32.const 0x1
000036: 10 80 80 80 80 00 | call 0
000037: R_FUNC_INDEX_LEB 0
00003c: 0b | end
00003d func[1]:
00003f: 41 02 | i32.const 0x2
000041: 10 81 80 80 80 00 | call 0x1
000042: R_FUNC_INDEX_LEB 1
000047: 0b | end
;;; STDOUT ;;)