Closed ketsuban closed 6 years ago
Okay, clearly I had some sort of brain mystery because the solution has been semi-documented for a year now - panic_fmt
needs to be both #[no_mangle]
and pub
.
This whole thing seems like it should be mentioned at the end of "Hello from Rust", in the same vein as the preventative setting of bit 16 (enabling write protection in ring 0) when enabling paging.
Upon getting a successful
OKAY
from Rust code I took a hint from @phil-opp's guide and tried the following.As Phil's guide suggests, this produces undefined references to
memcpy
, but what's stranger is what happens when I bring inrlibc
to provide those symbols (and add--gc-sections
to the linker call to get rid of all the compiler builtins):I have
"panic-strategy": "abort"
in my target file, why is there a call torust_begin_unwind
from libcore?