Nikolay Nikolov
7a228bccfc
+ implement R_WASM_TABLE_INDEX_I32 relocations in the wasm internal linker
2024-01-01 16:41:03 +02:00
Nikolay Nikolov
1b2d29ea1a
+ implemented R_WASM_MEMORY_ADDR_I32 relocations in the wasm internal linker
2024-01-01 16:13:11 +02:00
Nikolay Nikolov
12d7d271d6
+ write the data section in the wasm internal linker exe writer
2024-01-01 15:58:17 +02:00
Nikolay Nikolov
1e89579766
+ WASI internal linker: implemented GetCodeSize, GetDataSize and GetBssSize.
2024-01-01 15:32:28 +02:00
Nikolay Nikolov
b361b41a86
+ webassembly internal linker: create separate exe sections for .rodata and .bss
2024-01-01 14:56:33 +02:00
Nikolay Nikolov
dc4689ba1b
* wasm internal linker: start the data section at offset 0, as WebAssembly is a Harvard architecture.
2024-01-01 14:44:44 +02:00
Nikolay Nikolov
69ce966691
+ implemented RELOC_TYPE_INDEX_LEB relocations in the wasm internal linker
2024-01-01 14:35:10 +02:00
Nikolay Nikolov
0b3238bcd3
* refactor: invert if condition and else statement (reducing the nesting level), because then terminates the function. No functional changes.
2024-01-01 14:04:29 +02:00
Nikolay Nikolov
5845bb9095
* produce an internal error, instead of a warning in case of RELOC_FUNCTION_INDEX_LEB pointing to a function with missing ExeFunctionIndex
2024-01-01 14:03:03 +02:00
Nikolay Nikolov
50986967f5
+ wasm internal linker: fill ExeFunctionIndex of alias code symbols as well
2024-01-01 14:01:43 +02:00
Nikolay Nikolov
cf79ca16b4
* only set MainFuncSymbol of code sections to the main (non-alias) symbol
2024-01-01 13:44:36 +02:00
Nikolay Nikolov
c453bac7ad
+ report an error in case a wasm object file has a code section, without a main symbol
2024-01-01 13:42:24 +02:00
Nikolay Nikolov
e1d56a9944
* wasm internal linker: use the main symbol (without WASM_SYM_EXPLICIT_NAME,
...
i.e. not an alias) to define code section names in the wasm object reader.
For example, the section for the INITHEAP function is now called:
.text.n_SYSTEM_$$_INITHEAP
instead of
.text.n__FPC_InitHeap
(which is based on an explicit alias for the function - '_FPC_InitHeap')
2024-01-01 13:35:23 +02:00
Nikolay Nikolov
7747e1f6c8
+ wasm internal linker: write the functions, defined in the current module in the linker map file
2024-01-01 13:20:28 +02:00
Nikolay Nikolov
409de5ac96
+ write the import function indexes in the linker map file
2024-01-01 13:13:48 +02:00
Nikolay Nikolov
1c1dbaf776
+ partial implementation of RELOC_FUNCTION_INDEX_LEB relocations in the wasm internal linker
2024-01-01 01:05:49 +02:00
Nikolay Nikolov
f4f6a16796
+ fill the memory section in the wasm exe writer
2024-01-01 00:39:14 +02:00
Nikolay Nikolov
507e9eb20a
+ added check for the ExeFunctionIndex inside WriteCodeSegments
2024-01-01 00:15:27 +02:00
Nikolay Nikolov
88a42c3ee0
+ write the type indexes correctly
2023-12-31 23:50:53 +02:00
Nikolay Nikolov
f5dbd38b7e
* extracted the import preparation to a separate method TWasmExeOutput.PrepareImports
2023-12-31 23:39:26 +02:00
Nikolay Nikolov
946fc370e9
* set TWasmObjSection.MainFuncSymbol in the wasm object reader
2023-12-31 23:32:51 +02:00
Nikolay Nikolov
ac0c187b56
+ WebAssembly exe writer: write the code section
2023-12-31 23:29:33 +02:00
Nikolay Nikolov
d9a67bb16d
+ generate the import section in the wasm exe writer
2023-12-31 22:52:03 +02:00
Nikolay Nikolov
2c72b62a0e
+ generate and write the Type section in the WebAssembly internal exe writer
2023-12-31 22:47:07 +02:00
Nikolay Nikolov
3c4a1087f3
* writing of the type wasm object section extracted to a method TWasmFuncTypeTable.WriteTo, so it can be reused in the exe writer
2023-12-31 22:43:44 +02:00
Nikolay Nikolov
a387accf81
* WriteWasmBasicType and WriteWasmResultType converted to global functions to allow reuse in the exe writer
2023-12-31 22:39:35 +02:00
Nikolay Nikolov
5583781f47
+ initialize TWasmExeOutput.FWasmSections
2023-12-31 22:36:45 +02:00
Nikolay Nikolov
7d6158d5f4
+ added and implemented TWasmExeOutput.WriteWasmSection
2023-12-31 22:35:44 +02:00
Nikolay Nikolov
c342a5f473
* converted some helper methods from TWasmObjOutput to global functions, so they can be reused in the exe writer
2023-12-31 22:28:53 +02:00
Nikolay Nikolov
b2f31c4112
+ added a section array to the wasm exe writer
2023-12-31 22:27:05 +02:00
Nikolay Nikolov
16c4e0300c
+ WebAssembly internal linker, exe writer: keep track of exe import functions. Add and fill TWasmObjSymbolLinkingData.ExeFunctionIndex
2023-12-31 22:17:51 +02:00
Nikolay Nikolov
da8ccd64ef
+ also write the functype of imported functions in the linker map file
2023-12-31 21:50:18 +02:00
Nikolay Nikolov
52f0ec579e
+ added TWasmFuncType.ToString implementation
2023-12-31 21:49:35 +02:00
Nikolay Nikolov
4f4beb6225
+ store the functype in TWasmObjSymbolLinkingData
2023-12-31 21:40:34 +02:00
Nikolay Nikolov
880eb3658a
+ process the module imports and write them to the map file in TWasmExeOutput.AfterUnusedSectionRemoval
2023-12-31 21:27:21 +02:00
Nikolay Nikolov
541bd66a6c
+ implemented TWasmExeOutput.GenerateLibraryImports
2023-12-31 21:04:04 +02:00
Nikolay Nikolov
b88b8efbce
+ WebAssembly object reader: create symbols for imports that have the
...
WASM_SYM_EXPLICIT_NAME flag set. Save the import module and name info inside
a new field TWasmObjSymbol.LinkingData.
2023-12-31 20:39:01 +02:00
Nikolay Nikolov
f83223c8b2
* SymbolTable.ObjSym type changed from TObjSymbol to TWasmObjSymbol
2023-12-31 20:28:44 +02:00
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
Rika Ichinose
8310b169b7
Move ERMS branch into a separate function instead of runtime checks of fast_large_repmovstosb.
2023-12-31 09:54:09 +00:00
Rika Ichinose
f14aced9c5
Attempt to ERMS backward i386 ‘Move’s.
2023-12-31 09:54:09 +00:00
mattias
92e960c49a
pas2js: marked allowed writeln
2023-12-30 18:16:31 +01:00
mattias
108ecaff22
fcl-passrc: fixed typo
2023-12-30 18:01:17 +01:00
Michaël Van Canneyt
087b6cadda
* Not needed
2023-12-30 17:08:14 +01:00
Michaël Van Canneyt
6ce2662128
* No static versions for 5.6 and 5.7
2023-12-30 17:05:40 +01:00
Jonas Maebe
569b35dfc4
LLVM: enforce line information for invoke instructions
...
Like with call instructions, when generating debug information LLVM requires
line information for invoke instructions that may be inline
2023-12-30 14:56:38 +01:00