diff options
author | bloodstalker <thabogre@gmail.com> | 2018-05-25 23:45:50 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-05-25 23:45:50 +0000 |
commit | a2afe6ff184bc20993f58388887a2d4f1454c140 (patch) | |
tree | 98c3928c40cd268bfbaeb78abbcce50914ef9ea2 /bruiser/wasm/OpCodes.py | |
parent | wip:added a wasm backend. i need to setup an interface with the main c++ code... (diff) | |
download | mutator-a2afe6ff184bc20993f58388887a2d4f1454c140.tar.gz mutator-a2afe6ff184bc20993f58388887a2d4f1454c140.zip |
load.py is now imported bt another python module, should cut down on startup time. added the WASM linking structures to dwasm. i can start working on the linker as soon as i get some tests.
Diffstat (limited to '')
-rw-r--r-- | bruiser/wasm/OpCodes.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bruiser/wasm/OpCodes.py b/bruiser/wasm/OpCodes.py index ce813b0..f7c9a1b 100644 --- a/bruiser/wasm/OpCodes.py +++ b/bruiser/wasm/OpCodes.py @@ -11,6 +11,14 @@ class RelocType(Enum): R_WEBASSEMBLY_MEMORY_ADDR_I32 = 5 R_WEBASSEMBLY_TYPE_INDEX_LEB = 6 R_WEBASSEMBLY_GLOBAL_INDEX_LEB = 7 + R_WEBASSEMPLY_FUNCTION_OFFSET_I32 = 8 + R_WEBASSEMBLY_SECTION_OFFSET_I32 = 9 + +class LinkingSubsection(Enum): + WASM_SEGMENT_INFO = 5 + WASM_INIT_FUNCS = 6 + WASM_COMDAT_INFO = 7 + WASM_SYMBOL_TABLE = 8 class TypeType(Enum): none = 1 @@ -19,6 +27,12 @@ class TypeType(Enum): flot = 4 dobl = 5 +class Syminfo_Kind(): + SYMTAB_FUNCTION = 0 + SYMTAB_DATA = 1 + SYMTAB_GLOBAL = 2 + SYMTAB_SECTION = 3 + TypeKS = [['uint8', 8, TypeType.none], ['uint16', 16, TypeType.none], ['uint32', 32, TypeType.none], ['uint64', 64, TypeType.none], ['varuint1', 1, TypeType.lebu], ['varuint7', 7, TypeType.lebu], |