diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-12-29 05:49:36 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-12-29 05:49:36 -0800 |
| commit | b14a4258a69ee74c226097e0ed36f1b3ae6bbcfc (patch) | |
| tree | 75eaaf2e71b27b8f90ea486d7e16303c3dc77911 /include | |
| parent | dce807770035b3b6d06f6d9317a336cf21a7b26a (diff) | |
[PATCH] Add a.out support for x86-64
From: Andi Kleen <ak@muc.de>
Add 32bit a.out support for x86-64.
Not exactly an important bug fix, but maybe it will help someone. This
should increase the current 98% compatibility to i386 to perhaps 98.1% @)
I tested an old a.out SuSE 4.2 installation in chroot and it worked. It
also ran some very old linux binaries from '92 found on ftp.funet.fi. The
only program that didn't was the SuSE a.out GNU emacs, but I was too lazy
to track that down. Core dumps are not supported.
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-x86_64/a.out.h | 8 | ||||
| -rw-r--r-- | include/asm-x86_64/stat.h | 15 |
2 files changed, 18 insertions, 5 deletions
diff --git a/include/asm-x86_64/a.out.h b/include/asm-x86_64/a.out.h index 83c98f8e801d..5c89a5f7046d 100644 --- a/include/asm-x86_64/a.out.h +++ b/include/asm-x86_64/a.out.h @@ -1,13 +1,11 @@ #ifndef __X8664_A_OUT_H__ #define __X8664_A_OUT_H__ - -/* Note: a.out is not supported in 64bit mode. This is just here to - still let some old things compile. */ +/* 32bit a.out */ struct exec { - unsigned long a_info; /* Use macros N_MAGIC, etc for access */ + unsigned int a_info; /* Use macros N_MAGIC, etc for access */ unsigned a_text; /* length of text, in bytes */ unsigned a_data; /* length of data, in bytes */ unsigned a_bss; /* length of uninitialized data area for file, in bytes */ @@ -23,7 +21,7 @@ struct exec #ifdef __KERNEL__ -#define STACK_TOP TASK_SIZE +#define STACK_TOP 0xc0000000 #endif diff --git a/include/asm-x86_64/stat.h b/include/asm-x86_64/stat.h index 29767169b2b1..fd9f00d560f8 100644 --- a/include/asm-x86_64/stat.h +++ b/include/asm-x86_64/stat.h @@ -26,4 +26,19 @@ struct stat { long __unused[3]; }; +/* For 32bit emulation */ +struct __old_kernel_stat { + unsigned short st_dev; + unsigned short st_ino; + unsigned short st_mode; + unsigned short st_nlink; + unsigned short st_uid; + unsigned short st_gid; + unsigned short st_rdev; + unsigned int st_size; + unsigned int st_atime; + unsigned int st_mtime; + unsigned int st_ctime; +}; + #endif |
