예제 #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
     };
 }
예제 #2
0
파일: WasmLoader.cs 프로젝트: ghmole/reko
        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
            });
        }
예제 #3
0
 public WasmRewriter(WasmArchitecture arch, EndianImageReader rdr, IStorageBinder binder)
 {
     this.arch   = arch;
     this.dasm   = new WasmDisassembler(rdr).GetEnumerator();
     this.binder = binder;
 }