Browse Source
* Use WASM function names in compiled objects Instead of generating symbol names in the format "wasm[$MODULE_ID]::function[$FUNCTION_INDEX]", generate (if possible) something more readable, such as "wasm[$MODULE_ID]::$FUNCTION_NAME". This helps when debugging or profiling the generated code. Co-authored-by: Jamey Sharp <jsharp@fastly.com> * Ensure symbol names are cleaned up and have function indexes Filter symbol names to include only characters that are usually used for function names, and that might be produced by name mangling. Replace everything else with a question mark (and all repeated question marks by a single one), and then truncate to a length of 96 characters. This should be enough to not only avoid passing user-controlled strings to tools such as "perf" and "objdump", and make it easier to disambiguate symbols that might have the same name but different indices. * Make symbol cleaning slightly more efficient * Update symbol names to be closer to what tests expect * Ensure only alphanumeric ASCII characters are allowed in a symbol name * Ensure sliced symbol name is within its bounds * Update test expectations after adding function name to symbol name --------- Co-authored-by: Jamey Sharp <jsharp@fastly.com>pull/8640/head
L. Pereira
6 months ago
committed by
GitHub
83 changed files with 134 additions and 89 deletions
Loading…
Reference in new issue