Nikolay Nikolov
f30a41359d
+ added a TWasmFuncTypeTable instance to TWasmExeOutput
2023-12-31 16:50:00 +02:00
Nikolay Nikolov
e695edff98
+ initialize TWasmObjData.FFuncTypes in TWasmObjData's constructor
2023-12-31 15:54:52 +02:00
Nikolay Nikolov
0be3fe9ab4
- removed TWasmObjData.AddFuncType, instead call directly [F]FuncTypes.AddOrGetFuncType
2023-12-31 15:52:27 +02:00
Nikolay Nikolov
eb046b07d0
* TWasmFuncTypeTable.AddFuncType renamed .AddOrGetFuncType
2023-12-31 15:49:26 +02:00
Nikolay Nikolov
7266981c6c
+ Extracted the func list maintenance functionality from the WebAssembly object
...
writer to a new TWasmFuncTypeTable class. This will allow for it to be reused
in the WebAssembly exe writer as well.
2023-12-31 15:39:54 +02:00
Nikolay Nikolov
d6c3c74b46
+ create relocation objects for R_WASM_FUNCTION_OFFSET_I32 relocations in the wasm object reader
2023-12-28 21:26:12 +02:00
Nikolay Nikolov
73895d3cbc
+ create relocation objects for R_WASM_TYPE_INDEX_LEB relocations in the wasm object reader
2023-12-28 21:23:08 +02:00
Nikolay Nikolov
ae93f8de91
+ create relocation objects for R_WASM_MEMORY_ADDR_I32 relocations in the wasm object reader
2023-12-28 21:15:59 +02:00
Nikolay Nikolov
35f2fb1e8d
* fix warning
2023-12-28 21:11:26 +02:00
Nikolay Nikolov
bd606c6b77
+ create relocation objects for R_WASM_MEMORY_ADDR_SLEB relocations in the wasm object reader
2023-12-28 21:07:41 +02:00
Nikolay Nikolov
3e14d47b92
+ create relocation objects for R_WASM_MEMORY_ADDR_LEB relocations in the wasm object reader
2023-12-28 21:04:13 +02:00
Nikolay Nikolov
118e093c97
+ create relocation objects for R_WASM_TABLE_INDEX_I32 relocations in the wasm object reader
2023-12-28 20:59:32 +02:00
Nikolay Nikolov
c605da6ab3
+ create relocation objects for R_WASM_TABLE_INDEX_SLEB relocations in the wasm object reader
2023-12-28 20:57:04 +02:00
Nikolay Nikolov
aa296af787
+ create relocation objects for R_WASM_FUNCTION_INDEX_LEB relocations in the wasm object reader
2023-12-28 20:52:17 +02:00
Nikolay Nikolov
bc798695fe
+ find the code and data segment of each relocation
2023-12-28 20:07:24 +02:00
Nikolay Nikolov
268a148d3a
+ store the parsed relocation table in an array
2023-12-28 16:47:00 +02:00
Nikolay Nikolov
82c52ed127
* disallow (for now) relocations for sections other than the code and data sections
2023-12-28 16:37:58 +02:00
Nikolay Nikolov
649438efa6
+ keep track of section indexes. Save the code and data section indexes.
2023-12-28 16:35:11 +02:00
Nikolay Nikolov
a1bdf11d99
+ check for supported relocation types, report an error if an unsupported type is found
2023-12-28 16:09:03 +02:00
Nikolay Nikolov
881ca2c52f
+ implemented parsing of the relocation section
2023-12-28 16:02:27 +02:00
Nikolay Nikolov
7f30a87651
+ started implementing the reading of relocation sections in the wasm object reader
2023-12-28 15:53:45 +02:00
Nikolay Nikolov
026781b9a3
* set MaxMemPos in the wasm internal linker
2023-12-28 15:27:53 +02:00
Nikolay Nikolov
eeae32669e
+ add oso_keep flag to the code sections that contain an export
2023-12-28 14:54:06 +02:00
Nikolay Nikolov
24972d9861
+ parse the export table in the wasm internal object reader
2023-12-28 14:50:51 +02:00
Nikolay Nikolov
4b9e1ab30a
+ wasm object reader: create code sections and symbols
2023-12-28 14:29:59 +02:00
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