In trampoline generation, ensure all custom sections are eh frames.

.eh_frames may refer to the trampoline, but it is impossible to encode such a relocation. The optional relocation "self-referential" target is replaced with a better named mandatory argument. The value will be discarded in trampoline generation with the rest of the .eh_frame.
This commit is contained in:
Nick Lewycky
2020-06-18 15:32:50 -07:00
parent 310ac6b44c
commit 54c7b6f876
3 changed files with 52 additions and 28 deletions

View File

@ -274,7 +274,7 @@ impl FuncTranslator {
load_object_file(
mem_buf_slice,
".wasmer_function",
Some(RelocationTarget::LocalFunc(*local_func_index)),
RelocationTarget::LocalFunc(*local_func_index),
|name: &String| {
if let Some((index, _)) = func_names
.iter()