Hello! I am compiling each function without usage of cranelift-object or cranelift-jit crates and instead allocate the code for bytes produced by ctx.compile_and_emit()
. I don't quite get how to acquire text section offset from that? Is there any convenient method to get trap code associated with trap instruction?
You can use compiled_code.buffer.traps()
where compiled_code
is the value returned by compile_and_emit()
to get access to all offsets where a trap can happen as well as their trap code.
Last updated: Dec 23 2024 at 13:07 UTC