[llvm-dev] [WebAssembly] relocations for dwarf

Carlo Kok via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 27 08:18:20 PDT 2017

Current LLVM crashes (assertion in debug) when emitting debug info in a wasm file. While I realize there's no definitive info on what/how debug info will look when that gets decided on, crashing is probably not the thing it should do. 

Attached is a patch that makes llvm emit mostly valid dwarf debug info; while there's no debugger that can currently understand this, I think it's a step forward. 

If there's no interest in this I'll just use it for my own purposes.

My changes:

Added a new relocation type: R_WEBASSEMBLY_FUNCTION_OFFSET_I32
A relocation like this contains the offset of the target label relative to the start of the wasm code section. This relocation is only for  data -> code relocations of course.

Carlo Kok
RemObjects Software
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: llvm-diff.txt
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170927/b6e34a17/attachment.txt>

More information about the llvm-dev mailing list