blob: 35ed24b2ccd2e1a57da839442fe450bbb122b102 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
;;; TOOL: run-objdump
;;; ARGS0: -v
;;; ARGS1: -x
(module
(type $t (func (param i32)))
(func (type $t))
(func (param i32 i64))
(func (result f64)
f64.const 0)
(table 6 6 anyfunc)
(elem (i32.const 0) 1 1)
(elem (i32.const 2) 0 0 1 2))
(;; STDOUT ;;;
0000000: 0061 736d ; WASM_BINARY_MAGIC
0000004: 0100 0000 ; WASM_BINARY_VERSION
; section "Type" (1)
0000008: 01 ; section code
0000009: 00 ; section size (guess)
000000a: 03 ; num types
; type 0
000000b: 60 ; func
000000c: 01 ; num params
000000d: 7f ; i32
000000e: 00 ; num results
; type 1
000000f: 60 ; func
0000010: 02 ; num params
0000011: 7f ; i32
0000012: 7e ; i64
0000013: 00 ; num results
; type 2
0000014: 60 ; func
0000015: 00 ; num params
0000016: 01 ; num results
0000017: 7c ; f64
0000009: 0e ; FIXUP section size
; section "Function" (3)
0000018: 03 ; section code
0000019: 00 ; section size (guess)
000001a: 03 ; num functions
000001b: 00 ; function 0 signature index
000001c: 01 ; function 1 signature index
000001d: 02 ; function 2 signature index
0000019: 04 ; FIXUP section size
; section "Table" (4)
000001e: 04 ; section code
000001f: 00 ; section size (guess)
0000020: 01 ; num tables
; table 0
0000021: 70 ; anyfunc
0000022: 01 ; limits: flags
0000023: 06 ; limits: initial
0000024: 06 ; limits: max
000001f: 05 ; FIXUP section size
; section "Elem" (9)
0000025: 09 ; section code
0000026: 00 ; section size (guess)
0000027: 02 ; num elem segments
; elem segment header 0
0000028: 00 ; table index
0000029: 41 ; i32.const
000002a: 00 ; i32 literal
000002b: 0b ; end
000002c: 02 ; num function indices
000002d: 01 ; function index
000002e: 01 ; function index
; elem segment header 1
000002f: 00 ; table index
0000030: 41 ; i32.const
0000031: 02 ; i32 literal
0000032: 0b ; end
0000033: 04 ; num function indices
0000034: 00 ; function index
0000035: 00 ; function index
0000036: 01 ; function index
0000037: 02 ; function index
0000026: 11 ; FIXUP section size
; section "Code" (10)
0000038: 0a ; section code
0000039: 00 ; section size (guess)
000003a: 03 ; num functions
; function body 0
000003b: 00 ; func body size (guess)
000003c: 00 ; local decl count
000003d: 0b ; end
000003b: 02 ; FIXUP func body size
; function body 1
000003e: 00 ; func body size (guess)
000003f: 00 ; local decl count
0000040: 0b ; end
000003e: 02 ; FIXUP func body size
; function body 2
0000041: 00 ; func body size (guess)
0000042: 00 ; local decl count
0000043: 44 ; f64.const
0000044: 0000 0000 0000 0000 ; f64 literal
000004c: 0b ; end
0000041: 0b ; FIXUP func body size
0000039: 13 ; FIXUP section size
table.wasm: file format wasm 0x1
Section Details:
Type[3]:
- type[0] (i32) -> nil
- type[1] (i32, i64) -> nil
- type[2] () -> f64
Function[3]:
- func[0] sig=0
- func[1] sig=1
- func[2] sig=2
Table[1]:
- table[0] type=anyfunc initial=6 max=6
Elem[2]:
- segment[0] table=0 count=2 - init i32=0
- elem[0] = func[1]
- elem[1] = func[1]
- segment[1] table=0 count=4 - init i32=2
- elem[2] = func[0]
- elem[3] = func[0]
- elem[4] = func[1]
- elem[5] = func[2]
Code Disassembly:
00003b func[0]:
00003d: 0b | end
00003e func[1]:
000040: 0b | end
000041 func[2]:
000043: 44 00 00 00 00 00 00 00 00 | f64.const 0x0p+0
00004c: 0b | end
;;; STDOUT ;;)
|