Nikolay Nikolov
4b179ce4fa
+ check the code entries count in the wasm object reader
2023-12-28 14:14:30 +02:00
Nikolay Nikolov
87a3bfe99d
+ fully implemented reading the code section
2023-12-28 13:25:44 +02:00
Nikolay Nikolov
3d5a100f79
+ wasm object reader: implemented parsing of the global section
2023-12-28 12:42:48 +02:00
Nikolay Nikolov
4ba064d894
+ include mod name in symbols
2023-12-27 15:15:54 +02:00
Nikolay Nikolov
c293d0b729
+ partially implemented the creation of symbols for SYMTAB_FUNCTION entries
2023-12-27 15:14:21 +02:00
Nikolay Nikolov
a6d4374f10
+ wasm object reader: range check the symbol indices of SYMTAB_FUNCTION entries
2023-12-27 14:52:37 +02:00
Nikolay Nikolov
efc4ab7928
+ store in the FuncTypes array the func types, parsed in the function section
2023-12-27 14:47:45 +02:00
Nikolay Nikolov
a0df7c27af
+ wasm obj reader: store the parsed import data from the import section in local arrays and structures
2023-12-27 14:42:01 +02:00
Nikolay Nikolov
ced7e40c43
+ support local binding when reading data symbols in the internal wasm object reader
2023-12-27 13:36:18 +02:00
Nikolay Nikolov
ee4d77b119
+ create data symbols in the wasm object reader
2023-12-27 13:14:27 +02:00
Nikolay Nikolov
e569863a1a
+ check bounds for SymIndex of SYMTAB_DATA symbols
2023-12-27 13:01:49 +02:00
Nikolay Nikolov
121e793c37
+ wasm object reader: store the symbol table in a dynamic array, so it can be processed later
2023-12-27 11:52:17 +02:00
Nikolay Nikolov
c6e054dbb9
+ implemented parsing of the symbol table in the wasm object reader
2023-12-27 10:59:02 +02:00
Nikolay Nikolov
272db1b872
+ symbol table subsection duplicate check
2023-12-27 10:31:24 +02:00
Nikolay Nikolov
b641687da2
* attempt to avoid warning, treated as error, causing CI failure
2023-12-26 20:46:25 +02:00
Nikolay Nikolov
fc7ed302e7
+ check and report an error if a passive data segment is encountered by the wasm object reader
2023-12-26 20:42:46 +02:00
Nikolay Nikolov
8606f13b24
+ check for memory index other than 0 in the wasm object reader and report an error, since that is not supported
2023-12-26 20:41:40 +02:00
Nikolay Nikolov
23fa8c80b6
+ read the section content in the wasm object reader
2023-12-26 20:38:58 +02:00
Nikolay Nikolov
56fe6cadc8
* fill the data in the DataSegments array when parsing the WASM_SEGMENT_INFO subsection
2023-12-26 20:24:52 +02:00
Nikolay Nikolov
50f76a2ffb
* moved another local var to avoid bug
2023-12-26 20:22:47 +02:00
Nikolay Nikolov
2ab16a5a8f
- removed debug writeln
2023-12-26 20:21:25 +02:00
Nikolay Nikolov
e754937ad3
+ verify the segment count when parsing the WASM_SEGMENT_INFO subsection
...
* moved local vars to avoid bug
2023-12-26 20:19:58 +02:00
Nikolay Nikolov
bbb564437d
+ parse the data section in the wasm object reader
2023-12-26 17:42:01 +02:00
Nikolay Nikolov
818b6e6983
* check that the data count section preceeds the data section and report an error otherwise
2023-12-26 16:47:10 +02:00
Nikolay Nikolov
e4600f5e38
+ read the data count from the data section. Set size of the DataSegments
...
array, if the data count section hasn't been encountered. Compare the count
with the value from the data count section, in case the data count section
has been encountered, and issue an error, if they differ.
2023-12-26 16:44:34 +02:00
Nikolay Nikolov
10b201c506
+ check for duplicated data sections
2023-12-26 16:39:29 +02:00
Nikolay Nikolov
6f7c1b5b4e
+ added DataSegments dynarray of record, that will store data segment info
2023-12-26 16:32:30 +02:00
Nikolay Nikolov
e3c5d016e0
+ check for duplicated WASM_SEGMENT_INFO subsections
2023-12-26 16:26:37 +02:00
Nikolay Nikolov
3121ee1367
+ parse the WASM_SEGMENT_INFO subsection
2023-12-26 16:24:05 +02:00
Nikolay Nikolov
8a7743b566
* set FReader and InputFileName in the beginning of TWasmObjInput.ReadObjData
2023-12-26 16:07:34 +02:00
Nikolay Nikolov
e7f6da4cb0
* the 'linking' section is a section, not a subsection. Fix error messages.
2023-12-26 15:07:42 +02:00
Nikolay Nikolov
9063c3c0ed
+ parse the linking custom section by splitting it into subsections and call subfunctions (dummy for now) for each subsection
2023-12-26 15:06:03 +02:00
Nikolay Nikolov
8802c7d489
+ parse and check the version of the 'linking' section
2023-12-26 14:42:51 +02:00
Nikolay Nikolov
5a5abe2419
+ started parsing of custom sections - known custom sections are dispatched to
...
a specialized parsing function for each of them, while unknown custom sections
(currently the ones, not produced by FPC) produce an error
2023-12-26 14:32:34 +02:00
Nikolay Nikolov
2ae98a7363
+ read the code entries count from the code section
2023-12-26 13:57:55 +02:00
Nikolay Nikolov
7d41f5eb92
+ added code section duplicate check in wasm object reader
2023-12-26 13:49:40 +02:00
Nikolay Nikolov
b2861bacdd
- removed the repeated section bounds check in the section parsing code,
...
because now all reads go through the read function, which does section bounds
checking on every read
2023-12-26 13:42:07 +02:00
Nikolay Nikolov
8591f1218c
+ added section bounds checking to the read function, used inside TWasmObjInput.ReadObjData.ReadSection
2023-12-26 13:40:26 +02:00
Nikolay Nikolov
16c18e845f
- removed the TObjectReader parameter from ReadUleb, ReadUleb32 and ReadName
2023-12-26 13:24:29 +02:00
Nikolay Nikolov
01d97bea00
- rm commented out code
2023-12-26 13:13:42 +02:00
Nikolay Nikolov
36fe4cf43d
* the ReadUleb, ReadUleb32 and ReadName methods moved to be local functions inside TWasmObjInput.ReadObjData.ReadSection
2023-12-26 13:12:44 +02:00
Nikolay Nikolov
c9b407508a
* use ReadUleb32 in more places
2023-12-26 12:46:06 +02:00
Nikolay Nikolov
621699acca
+ introduced ReadUleb32 to avoid code repetition of the >high(uint32) checks
2023-12-26 11:43:49 +02:00
Nikolay Nikolov
bcb7c069fb
+ parse the data count section
2023-12-26 10:25:20 +02:00
Nikolay Nikolov
f87a66f1e6
+ parse the rest of the function section
2023-12-24 16:56:28 +02:00
Nikolay Nikolov
c7880e7bd1
+ read the functions count from the functions section
2023-12-24 16:53:05 +02:00
Nikolay Nikolov
be56b641d7
+ function section duplicate check
2023-12-24 16:51:23 +02:00
Nikolay Nikolov
e81b062e2d
+ WebAssembly object reader: implemented parsing of the import section
2023-12-24 16:35:39 +02:00
Nikolay Nikolov
e6a3aa3450
+ import section duplicate check
2023-12-24 16:35:39 +02:00
Nikolay Nikolov
3bc6340424
- removed TODO comment
2023-12-24 15:28:01 +02:00