Александр Гурьянов
unread,Jul 30, 2019, 11:08:17 PM7/30/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripte...@googlegroups.com
HI. I used wasm-opt manually to optimize wasm binary. On last step I
used Oz to finalize optimizations. My problem is that after Oz
function indexes is changed and I can't get symbols map to restore
function names. How I can map new function indexes to old one (from
symbols file).
In other words:
1) I have bin.wasm from emscripten with symbols file. E.g. for one function:
export __GLOBAL__sub_I_Runtime_BaseClasses_0_cpp (func $3425) - 3809
2) I do some buisness releated optimizations (with wasm-opt) that
didn't change function indexes, after this, I still have
export __GLOBAL__sub_I_Runtime_BaseClasses_0_cpp (func $3425) - 3809
3) Next I finalize build with wasm-opt -Oz, after it indexes was
changed (I think because of dead code elimination), and I have
export "__GLOBAL__sub_I_Runtime_BaseClasses_0_cpp" (func $1637) - 1997
I need some flag for Oz, that told generates mapping for new indexes,
like $1637: $3425 then I can restore original function names. I think
some flag or option to do it should be already there, because
emscripten do this in some way. What is the best way to build this
mappings?