The 16bit and 32bit code can't share debuginfo because it points to
code and must point to 16bit code in 16bit mode. Introduce two
separate variables - one for 32bit mode and one for 16bit mode.
debug_serial(c);
}
-struct putcinfo debuginfo VAR16VISIBLE = { putc_debug };
+#if MODE16
+static struct putcinfo debuginfo VAR16 = { putc_debug };
+#else
+static struct putcinfo debuginfo = { putc_debug };
+#endif
/****************************************************************