Example #1
0
 public WasmDisassembler(WasmArchitecture arch, EndianImageReader rdr)
 {
     this.arch = arch;
     this.addr = rdr.Address;
     this.rdr  = new WasmImageReader(new MemoryArea(rdr.Address, rdr.Bytes))
     {
         Offset = rdr.Offset
     };
 }
Example #2
0
        public override Program Load(Address?addrLoad)
        {
            var rdr        = LoadHeader();
            var sections   = LoadSections(rdr);
            var segmentMap = BuildSegmentMap(sections);
            var arch       = new WasmArchitecture(Services, "wasm", new Dictionary <string, object>());
            var platform   = new DefaultPlatform(Services, arch);

            return(new Program()
            {
                Architecture = arch,
                Platform = platform,
                SegmentMap = segmentMap
            });
        }
Example #3
0
 public WasmRewriter(WasmArchitecture arch, EndianImageReader rdr, IStorageBinder binder)
 {
     this.arch   = arch;
     this.dasm   = new WasmDisassembler(rdr).GetEnumerator();
     this.binder = binder;
 }