@@ -87,9 +87,11 @@ CodeAnalysis analyze_eof1(bytes_view container)
87
87
for (const auto offset : header.code_offsets )
88
88
relative_offsets.push_back (offset - code_sections_offset);
89
89
90
+ const auto data_section = container.substr (code_sections_end);
91
+
90
92
// FIXME: Better way of getting EOF version.
91
93
const auto eof_version = container[2 ];
92
- return CodeAnalysis{executable_code, {}, eof_version, relative_offsets};
94
+ return CodeAnalysis{executable_code, {}, eof_version, relative_offsets, data_section };
93
95
}
94
96
} // namespace
95
97
@@ -375,8 +377,8 @@ evmc_result execute(evmc_vm* c_vm, const evmc_host_interface* host, evmc_host_co
375
377
{
376
378
auto vm = static_cast <VM*>(c_vm);
377
379
const auto jumpdest_map = analyze (rev, {code, code_size});
378
- auto state =
379
- std::make_unique<ExecutionState>( *msg, rev, *host, ctx, bytes_view{code, code_size});
380
+ auto state = std::make_unique<ExecutionState>(
381
+ *msg, rev, *host, ctx, bytes_view{code, code_size}, jumpdest_map. data );
380
382
return execute (*vm, *state, jumpdest_map);
381
383
}
382
384
} // namespace evmone::baseline
0 commit comments