Module eh

Source
Expand description

Helpers for generating DWARF LSDA data for Cranelift-compiled functions.

The structures and encoding implemented here mirror what LLVM produces for Wasm exception handling so that Wasmer’s libunwind personalities can parse the tables without any runtime changes.

StructsΒ§

ActionTable πŸ”’
CallSiteDesc πŸ”’
FunctionLsdaData
Fully encoded LSDA bytes for a single function, together with pending tag relocations that will be resolved once the global tag section is built.
TagRelocation
Relocation information for an LSDA entry that references a tag constant.
TypeTable πŸ”’

EnumsΒ§

ActionKind πŸ”’
TypeEntry πŸ”’
TypeKey πŸ”’

FunctionsΒ§

build_function_lsda
Build the LSDA for a single function given the finalized Cranelift call-site metadata.
build_lsda_section
Build the LSDA custom section and record the offset for each function.
build_tag_section
Build the global tag section and a tag->offset map.
encode_action_table πŸ”’
encode_call_site_table πŸ”’
uleb128_len πŸ”’
write_encoded_offset πŸ”’