For reference, here is the patch I’ve made to libcore
to eliminate panicking. I obtain a ~6K reduction in code size in my current kernel by compiling the standard libraries with feature=trivial_panic
, mostly because more fmt
-related functions can be garbage-collected by the linker. (In both cases, the libraries are compiled -O3
. Failure to use -O3
resulted in the 45K image I mentioned earlier)
My understanding of the proposal is that -Z abort-on-panic
would do something like this patch (or maybe just replace call panic
with abort()
), except as a compiler flag, not a configuration variable in libcore