runtime: don't attempt to perform writeback if disabled in kernel.

Otherwise, the startup kernel session hangs.
This commit is contained in:
whitequark 2016-11-23 13:53:12 +00:00
parent cd7527b701
commit 4df7941a97

View File

@ -307,7 +307,10 @@ pub unsafe fn main() {
(mem::transmute::<usize, fn()>(library.lookup("__modinit__")))();
send(&NowSave(NOW));
attribute_writeback(library.lookup("typeinfo") as *const ());
let typeinfo = library.lookup("typeinfo");
if typeinfo != 0 {
attribute_writeback(typeinfo as *const ())
}
send(&RunFinished);