Package: bin86
Version: 0.16.17-2
Severity: grave

The 64-bit versions of this package don't produce useful code;  they're full of
sizeof(long) == 4 assumptions, causing as86 to mess up alignment, etc.

Attached patch fixes some of the problems, although I didn't get it to produce
equivalent images for my test case (bochsbios).

If nobody can step in and solve this, an alternative would be restricting
availability of this package to 32-bit architectures.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.18-6-amd64 (SMP w/2 CPU cores)
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages bin86 depends on:
ii  libc6                         2.7-9      GNU C Library: Shared libraries

bin86 recommends no packages.

-- no debconf information
diff -ur linux86-0.16.17.old/as/const.h linux86-0.16.17/as/const.h
--- linux86-0.16.17.old/as/const.h	2001-06-27 17:38:16.000000000 +0200
+++ linux86-0.16.17/as/const.h	2008-03-18 00:52:24.000000000 +0100
@@ -4,7 +4,7 @@
 #define LOW_BYTE	0	/* must be changed for big-endian */
 #else
 
-#define S_ALIGNMENT	sizeof(long)
+#define S_ALIGNMENT	4
 #endif
 
 /* const.h - constants for assembler */
diff -ur linux86-0.16.17.old/as/type.h linux86-0.16.17/as/type.h
--- linux86-0.16.17.old/as/type.h	2001-06-23 22:01:37.000000000 +0200
+++ linux86-0.16.17/as/type.h	2008-03-18 01:07:04.000000000 +0100
@@ -1,9 +1,11 @@
 /* type.h - types for assembler */
 
-typedef unsigned short u2_t;
-typedef unsigned u2_pt;
-typedef unsigned long u4_t;
-typedef unsigned long u4_pt;
+#include <stdint.h>
+
+typedef uint16_t u2_t;
+typedef uint32_t u2_pt;
+typedef uint32_t u4_t;
+typedef uint32_t u4_pt;
 
 /* redefine foo_t's because their use has become non-portable */
 
@@ -42,9 +44,9 @@
 typedef unsigned char scale_t;
 typedef unsigned char smallcount_t;
 typedef /* signed */ char sem_t;
-typedef unsigned u16_pt;
-typedef unsigned short u16_T;
-typedef unsigned long u32_T;
+typedef uint32_t u16_pt;
+typedef uint16_t u16_T;
+typedef uint32_t u32_T;
 
 /* symbol table entry */
 

Reply via email to