patch-2.4.14 linux/include/asm-alpha/a.out.h

Next file: linux/include/asm-alpha/floppy.h
Previous file: linux/fs/super.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.13/linux/include/asm-alpha/a.out.h linux/include/asm-alpha/a.out.h
@@ -90,8 +90,16 @@
 
 #ifdef __KERNEL__
 
+/* Assume that start addresses below 4G belong to a TASO application.
+   Unfortunately, there is no proper bit in the exec header to check.
+   Worse, we have to notice the start address before swapping to use
+   /sbin/loader, which of course is _not_ a TASO application.  */
+#define SET_AOUT_PERSONALITY(BFPM, EX) \
+	set_personality (BFPM->sh_bang || EX.ah.entry < 0x100000000 \
+			 ? PER_LINUX_32BIT : PER_LINUX)
+
 #define STACK_TOP \
-  ((current->personality==PER_LINUX_32BIT) ? (0x80000000) : (0x00120000000UL))
+  (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
 
 #endif
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)