Module eh

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 πŸ”’
CompactUnwindEntryData
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Β§

ExceptionType πŸ”’

ConstantsΒ§

STACK_SIZE_UNIT πŸ”’
UNWIND_ARM64_FRAMELESS_STACK_SIZE_SHIFT πŸ”’
UNWIND_ARM64_FRAME_D8_D9_PAIR πŸ”’
UNWIND_ARM64_FRAME_D10_D11_PAIR πŸ”’
UNWIND_ARM64_FRAME_D12_D13_PAIR πŸ”’
UNWIND_ARM64_FRAME_D14_D15_PAIR πŸ”’
UNWIND_ARM64_FRAME_X19_X20_PAIR πŸ”’
UNWIND_ARM64_FRAME_X21_X22_PAIR πŸ”’
UNWIND_ARM64_FRAME_X23_X24_PAIR πŸ”’
UNWIND_ARM64_FRAME_X25_X26_PAIR πŸ”’
UNWIND_ARM64_FRAME_X27_X28_PAIR πŸ”’
UNWIND_ARM64_MODE_FRAME πŸ”’
UNWIND_ARM64_MODE_FRAMELESS πŸ”’

FunctionsΒ§

build_compact_unwind_section
Build the 64-bit Mach-O __compact_unwind section consumed by the runtime compact-unwind publisher.
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.
compact_unwind_encoding_aarch64
encode_action_table πŸ”’
encode_call_site_table πŸ”’
uleb128_len πŸ”’
write_encoded_offset πŸ”’