Correcting workaround of qemu-system-i386 bug in loadign data segment - adding implicit check of HAL name before moving programs pointer befor CPIO archive decoding
@@ -58,7 +58,9 @@ int programs_decode(vm_map_t *kmap, vm_object_t *kernel)
syspage_program_t *pr;
if (hal_strncmp(cpio->c_magic, "070701", 6)) {
+
/* Happens in QEMU when programs are not page aligned. What the hell? */
+ if (!hal_strcmp(HAL, "hal/ia32/hal.h"))
cpio = (void *)(programs - 0x1000);
if (hal_strncmp(cpio->c_magic, "070701", 6)) {
