nickysn 433050a2c4 * set EXEEXT to .wasm for the WASI target in fpcmake il y a 4 ans
..
testscan 0dad8b4b3d [PATCH 120/188] adding test call_indirect using index reference il y a 5 ans
Makefile 433050a2c4 * set EXEEXT to .wasm for the WASI target in fpcmake il y a 4 ans
Makefile.fpc f6a15342c7 + makefile for utils/wasmbin (but no fpmake.pp yet) il y a 5 ans
README.md 008bd59623 [PATCH 029/188] Update README.md il y a 5 ans
fpmake.pp 08af87cde2 + also build wasmtool il y a 5 ans
lebutils.pas 7809dde9d5 + added mode objfpc and ansistrings ON directive to unit lebutils il y a 5 ans
parseutils.pas 17057abaf1 * applied the GPL license with Dmitry's permission il y a 5 ans
wasa.lpi dbde36f012 [PATCH 180/188] starting wasa project to be the assembler il y a 5 ans
wasa.pas 17057abaf1 * applied the GPL license with Dmitry's permission il y a 5 ans
wasmbin.pas 17057abaf1 * applied the GPL license with Dmitry's permission il y a 5 ans
wasmbincode.pas c97a244a3d * mode objfpc, h+ in wasmbincode.pas il y a 5 ans
wasmbindebug.pas 17057abaf1 * applied the GPL license with Dmitry's permission il y a 5 ans
wasmbinwriter.pas 17057abaf1 * applied the GPL license with Dmitry's permission il y a 5 ans
wasmld.lpi 56dff1f7cd [PATCH 048/188] update writing binaries il y a 5 ans
wasmld.lpr 17057abaf1 * applied the GPL license with Dmitry's permission il y a 5 ans
wasmlink.pas 8d5ddbf33f * mode objfpc, h+ in wasmlink il y a 5 ans
wasmlinkchange.pas 63ecdcffd1 * mode objfpc, h+ in wasmlinkchange.pas and wasmtoolutils.pas il y a 5 ans
wasmmodule.pas 6b5719879a * mode objfpc, h+ in wasmmodule il y a 5 ans
wasmnormalize.pas dbffac46cb * mode objfpc, h+ in wasmnormalize.pas il y a 5 ans
wasmtext.pas 05c5e28bca * mode objfpc, h+ in wasmtest.pas il y a 5 ans
wasmtool.lpi 102f894c4e [PATCH 013/188] update command line processing il y a 5 ans
wasmtool.lpr 17057abaf1 * applied the GPL license with Dmitry's permission il y a 5 ans
wasmtoolutils.pas 63ecdcffd1 * mode objfpc, h+ in wasmlinkchange.pas and wasmtoolutils.pas il y a 5 ans
watparser.pas 17057abaf1 * applied the GPL license with Dmitry's permission il y a 5 ans
watscanner.pas 17057abaf1 * applied the GPL license with Dmitry's permission il y a 5 ans
wattest.lpi a047ba4de8 [PATCH 069/188] downshift the version of the project for 2.0.6 il y a 5 ans
wattest.lpr 17057abaf1 * applied the GPL license with Dmitry's permission il y a 5 ans

README.md

wasmbin

Collection of WebAssembly binary utils

wasmtool

wasmtool is an utility that allows to modify wasm binary linking information. wat2wasm util is capable of generating binaries with relocation information. However the symbol flags are setup in the manner that final binaries cannot be linked by wasm-ld utility. (i.e. non setting weak symbols).

command

Only one command should be specified per call

exportrename

--exportrename inputfile

The option allow to change the export name. The reasoning for that is wasm-ld behavior of renaming the export from the declared name to the symbol name.

The input file can be either a text file, containing a list of oldname new name values:

OldExportName=NewExportName

or the input file can point to an object file. The object file's export section is parsed for the desired export names.

symbolflag

--symbolflag inputfile

The action allows to modify flags for the specified symbols. The input file specified must contain the pairs of symbolname + desired flags.

$TESTUNIT_$$_ADD$LONGINT$LONGINT$$LONGINT=WH

The desired flag is a string (or a character) that should consists of the following characters. Each character corresponds to a certain symbol linking flag:

  • W - WASM_SYM_BINDING_WEAK

  • H - WASM_SYM_VISIBILITY_HIDDEN

  • L - WASM_SYM_BINDING_LOCAL

  • D - removes flag WASM_SYM_BINDING_LOCAL

Multiple characters can be specified per flag.

symbolauto

 --symbolauto

The flags for each symbol updated and is determined based of the symbol use: if a function is a stub function (the only code is "unreachable"), the status given "weak" (it's a reference function elsewhere)

if a function is located in the function table, then the status given is
"hidden" (do not add to the final linked executable)

if a function is not located in the function table, the status given is:
"hidden"+"local" (local means the function can be used only in this object file)

Imported and exported functions are left unmodified.