nickysn 0767d971ab [PATCH 099/188] update call indirect parsing and binary writing 5 ani în urmă
..
testscan 1007ceaf59 [PATCH 096/188] adding call_indirect tests 5 ani în urmă
README.md 008bd59623 [PATCH 029/188] Update README.md 5 ani în urmă
lebutils.pas df750c92a0 [PATCH 086/188] extend utils for writing LEB values 5 ani în urmă
parseutils.pas 9383c8af45 [PATCH 092/188] scanning C number 5 ani în urmă
wasmbin.pas 56dff1f7cd [PATCH 048/188] update writing binaries 5 ani în urmă
wasmbincode.pas 01151eb899 [PATCH 098/188] adding support for getting a function reference via 5 ani în urmă
wasmbindebug.pas 64027a4527 [PATCH 003/188] starting on linking utils 5 ani în urmă
wasmbinwriter.pas 0767d971ab [PATCH 099/188] update call indirect parsing and binary writing 5 ani în urmă
wasmld.lpi 56dff1f7cd [PATCH 048/188] update writing binaries 5 ani în urmă
wasmld.lpr b663c9de01 [PATCH 021/188] trying to predict the symbol flag based on the symbol 5 ani în urmă
wasmlink.pas 01151eb899 [PATCH 098/188] adding support for getting a function reference via 5 ani în urmă
wasmlinkchange.pas 65f3a99ac7 [PATCH 018/188] allow flags to be set as a string rather than 5 ani în urmă
wasmmodule.pas 0767d971ab [PATCH 099/188] update call indirect parsing and binary writing 5 ani în urmă
wasmtext.pas 7aff2dd6ec [PATCH 050/188] commenting 5 ani în urmă
wasmtool.lpi 102f894c4e [PATCH 013/188] update command line processing 5 ani în urmă
wasmtool.lpr 7029fd383a [PATCH 057/188] adding an option to mark global variable as weak 5 ani în urmă
wasmtoolutils.pas 7029fd383a [PATCH 057/188] adding an option to mark global variable as weak 5 ani în urmă
watparser.pas 0767d971ab [PATCH 099/188] update call indirect parsing and binary writing 5 ani în urmă
watscanner.pas 5f20c9b269 [PATCH 093/188] update number parsing 5 ani în urmă
wattest.lpi a047ba4de8 [PATCH 069/188] downshift the version of the project for 2.0.6 5 ani în urmă
wattest.lpr 721b40bf04 [PATCH 068/188] explicit normalization 5 ani în urmă

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.