
This is my patch for linux-1.2.13 with gcc2.7.2 ELF format with 
opl-patch for SoundBlaster Cards.

Try it at your own risk! 

Any comments to: stange@cs.tu-berlin.de

Have Fun!



diff -c -r linux//Makefile linux_patched//Makefile
*** linux//Makefile	Wed Jul 26 06:43:44 1995
--- linux_patched//Makefile	Tue Feb  6 21:42:11 1996
***************
*** 68,74 ****
  # standard CFLAGS
  #
  
! CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
  
  ifdef CONFIG_CPP
  CFLAGS := $(CFLAGS) -x c++
--- 68,74 ----
  # standard CFLAGS
  #
  
! CFLAGS = -Wall -Wstrict-prototypes -O3 -fomit-frame-pointer
  
  ifdef CONFIG_CPP
  CFLAGS := $(CFLAGS) -x c++
diff -c -r linux//arch/i386/Makefile linux_patched//arch/i386/Makefile
*** linux//arch/i386/Makefile	Sat Feb 25 13:55:27 1995
--- linux_patched//arch/i386/Makefile	Tue Dec 26 02:43:39 1995
***************
*** 1,3 ****
--- 1,12 ----
+ 
+ #
+ # We use ELF.
+ #
+ USE_ELF=yes
+ #
+ # We use a.out.
+ #USE_ELF=no
+ 
  #
  # i386/Makefile
  #
***************
*** 21,30 ****
--- 30,56 ----
  # ZLINKFLAGS   = -Ttext 0x1000
  # LINKFLAGS    = -Ttext 0x100000
  #
+ #
+ ifeq ($(USE_ELF),yes)
+ LD=ld -m elf_i386
+ CPP=$(CC) -E -D__ELF__
+ OBJDUMP =objdump
+ OBJDUMP_FLAGS=-k -q  
+ LDFLAGS=-e startup_32 
+ ZIMAGE_OFFSET=0x1000
+ IMAGE_OFFSET=0x100000
+ ZLINKFLAGS =-Ttext $(ZIMAGE_OFFSET) $(LDFLAGS)
+ LINKFLAGS =-Ttext $(IMAGE_OFFSET) $(LDFLAGS)
+ else
+ AS=/usr/i486-linuxaout/bin/as
+ LD=/usr/i486-linuxaout/bin/ld -m i386linux
+ CC=gcc -b i486-linuxaout -D__KERNEL__ -I$(TOPDIR)/include
+ #
  # -qmagic (we need to remove the 32 byte header for bootup purposes)
  #
  ZLINKFLAGS =-qmagic -Ttext 0xfe0
  LINKFLAGS =-qmagic -Ttext 0xfffe0
+ endif
  CFLAGS := $(CFLAGS) -pipe
  
  ifdef CONFIG_M486
diff -c -r linux//arch/i386/boot/Makefile linux_patched//arch/i386/boot/Makefile
*** linux//arch/i386/boot/Makefile	Tue Jan  3 11:57:26 1995
--- linux_patched//arch/i386/boot/Makefile	Sun Aug 27 18:17:18 1995
***************
*** 11,18 ****
--- 11,27 ----
  AS86    =as86 -0 -a
  LD86    =ld86 -0
  
+ ifeq ($(USE_ELF),yes)
+ CFLAGS := $(CFLAGS) -D__BFD__
+ endif
+ 
  zImage: $(CONFIGURE) bootsect setup compressed/vmlinux tools/build
+ ifeq ($(USE_ELF),yes)
+ 	$(OBJDUMP) $(OBJDUMP_FLAGS) -o $(ZIMAGE_OFFSET) compressed/vmlinux > compressed/vmlinux.out
+ 	tools/build bootsect setup compressed/vmlinux.out $(ROOT_DEV) > zImage
+ else
  	tools/build bootsect setup compressed/vmlinux $(ROOT_DEV) > zImage
+ endif
  	sync
  
  compressed/vmlinux: $(TOPDIR)/vmlinux
***************
*** 56,60 ****
  
  clean:
  	rm -f bootsect setup
! 	rm -f zImage tools/build
  	@$(MAKE) -C compressed clean
--- 65,69 ----
  
  clean:
  	rm -f bootsect setup
! 	rm -f zImage tools/build compressed/vmlinux.out
  	@$(MAKE) -C compressed clean
diff -c -r linux//arch/i386/boot/compressed/Makefile linux_patched//arch/i386/boot/compressed/Makefile
*** linux//arch/i386/boot/compressed/Makefile	Tue Jan 31 06:58:00 1995
--- linux_patched//arch/i386/boot/compressed/Makefile	Sun Aug 27 18:17:18 1995
***************
*** 11,16 ****
--- 11,22 ----
  
  CFLAGS = -O2 -DSTDC_HEADERS
  
+ ifeq ($(USE_ELF),yes)
+ TARGET=--target elf32-i386
+ INPUT_DATA=input_data
+ INPUT_LEN=input_len
+ endif
+ 
  .c.s:
  	$(CC) $(CFLAGS) -S $<
  .s.o:
***************
*** 20,32 ****
  
  all: vmlinux
  
! vmlinux:	piggy.o $(OBJECTS)
! 		$(LD) $(ZLINKFLAGS) -o vmlinux $(OBJECTS) piggy.o
  
! head.o:	head.s
  
! head.s: head.S $(TOPDIR)/include/linux/tasks.h
! 	$(CPP) -traditional head.S -o head.s
  
  piggy.o:	$(SYSTEM) xtract piggyback
  		./xtract $(SYSTEM) | gzip -9 | ./piggyback > piggy.o
--- 26,51 ----
  
  all: vmlinux
  
! vmlinux: piggy.o $(OBJECTS)
! 	$(LD) $(ZLINKFLAGS) -o vmlinux $(OBJECTS) piggy.o
! 
! #head.o:	head.s
  
! head.o: head.S $(TOPDIR)/include/linux/tasks.h
! 	$(CC) -traditional -c head.S
  
! ifeq ($(USE_ELF),yes)
! 
! # You cannot compress a file and have the kernel uncompress it, it must
! # be stdin
! piggy.o:	$(SYSTEM)
! 	tmppiggy=/tmp/$$.piggy; \
! 	rm -f $$tmppiggy $$tmppiggy.gz; \
! 	$(OBJDUMP) $(OBJDUMP_FLAGS) -o $(IMAGE_OFFSET) $(SYSTEM) > $$tmppiggy; \
! 	gzip -f -9 < $$tmppiggy > $$tmppiggy.gz; \
! 	encaps $(TARGET) piggy.o $$tmppiggy.gz $(INPUT_DATA) $(INPUT_LEN); \
! 	rm -f $$tmppiggy $$tmppiggy.gz
! else
  
  piggy.o:	$(SYSTEM) xtract piggyback
  		./xtract $(SYSTEM) | gzip -9 | ./piggyback > piggy.o
***************
*** 37,41 ****
--- 56,62 ----
  piggyback: piggyback.c
  	$(HOSTCC) $(CFLAGS) -o piggyback piggyback.c
  
+ endif
+ 
  clean:
  	rm -f xtract piggyback vmlinux
diff -c -r linux//arch/i386/boot/compressed/head.S linux_patched//arch/i386/boot/compressed/head.S
*** linux//arch/i386/boot/compressed/head.S	Thu Dec 29 17:58:41 1994
--- linux_patched//arch/i386/boot/compressed/head.S	Sun Aug 27 18:17:18 1995
***************
*** 19,26 ****
--- 19,28 ----
  .text
  
  #define __ASSEMBLY__
+ #include <linux/linkage.h>
  #include <asm/segment.h>
  
+ 	.globl startup_32
  startup_32:
  	cld
  	cli
***************
*** 29,35 ****
  	mov %ax,%es
  	mov %ax,%fs
  	mov %ax,%gs
! 	lss _stack_start,%esp
  	xorl %eax,%eax
  1:	incl %eax		# check that A20 really IS enabled
  	movl %eax,0x000000	# loop forever if it isn't
--- 31,37 ----
  	mov %ax,%es
  	mov %ax,%fs
  	mov %ax,%gs
! 	lss SYMBOL_NAME(stack_start),%esp
  	xorl %eax,%eax
  1:	incl %eax		# check that A20 really IS enabled
  	movl %eax,0x000000	# loop forever if it isn't
***************
*** 46,53 ****
   * Clear BSS
   */
  	xorl %eax,%eax
! 	movl $__edata,%edi
! 	movl $__end,%ecx
  	subl %edi,%ecx
  	cld
  	rep
--- 48,55 ----
   * Clear BSS
   */
  	xorl %eax,%eax
! 	movl $ SYMBOL_NAME(_edata),%edi
! 	movl $ SYMBOL_NAME(_end),%ecx
  	subl %edi,%ecx
  	cld
  	rep
***************
*** 55,59 ****
  /*
   * Do the decompression, and jump to the new kernel..
   */
! 	call _decompress_kernel
  	ljmp $(KERNEL_CS), $0x100000
--- 57,61 ----
  /*
   * Do the decompression, and jump to the new kernel..
   */
! 	call SYMBOL_NAME(decompress_kernel)
  	ljmp $(KERNEL_CS), $0x100000
diff -c -r linux//arch/i386/boot/compressed/inflate.c linux_patched//arch/i386/boot/compressed/inflate.c
*** linux//arch/i386/boot/compressed/inflate.c	Thu Dec 29 17:58:41 1994
--- linux_patched//arch/i386/boot/compressed/inflate.c	Sun Aug 27 18:17:40 1995
***************
*** 9,15 ****
   */
  
  #ifndef lint
! static char rcsid[] = "$Id: inflate.c,v 0.10 1993/02/04 13:21:06 jloup Exp $";
  #endif
  
  #include "gzip.h"
--- 9,15 ----
   */
  
  #ifndef lint
! static char rcsid[] = "inflate.c,v 1.1.1.1 1995/03/11 20:40:35 hjl Exp";
  #endif
  
  #include "gzip.h"
diff -c -r linux//arch/i386/boot/tools/build.c linux_patched//arch/i386/boot/tools/build.c
*** linux//arch/i386/boot/tools/build.c	Thu Jan  5 15:29:01 1995
--- linux_patched//arch/i386/boot/tools/build.c	Sun Aug 27 18:17:48 1995
***************
*** 30,40 ****
--- 30,43 ----
  #include <fcntl.h>
  #include <linux/a.out.h>
  #include <linux/config.h>
+ #include <errno.h>
  
  #define MINIX_HEADER 32
  
  #define N_MAGIC_OFFSET 1024
+ #ifndef __BFD__
  static int GCC_HEADER = sizeof(struct exec);
+ #endif
  
  #define SYS_SIZE DEF_SYSSIZE
  
***************
*** 89,95 ****
--- 92,100 ----
  	int i,c,id, sz;
  	unsigned long sys_size;
  	char buf[1024];
+ #ifndef __BFD__
  	struct exec *ex = (struct exec *)buf;
+ #endif
  	char major_root, minor_root;
  	struct stat sb;
  	unsigned char setup_sectors;
***************
*** 190,195 ****
--- 195,201 ----
  	
  	if ((id=open(argv[3],O_RDONLY,0))<0)
  		die("Unable to open 'system'");
+ #ifndef __BFD__
  	if (read(id,buf,GCC_HEADER) != GCC_HEADER)
  		die("Unable to read header of 'system'");
  	if (N_MAGIC(*ex) == ZMAGIC) {
***************
*** 203,208 ****
--- 209,222 ----
  		ex->a_data /1024,
  		ex->a_bss  /1024);
  	sz = N_SYMOFF(*ex) - GCC_HEADER + 4;
+ #else
+ 	if (fstat (id, &sb)) {
+ 	  perror ("fstat");
+ 	  die ("Unable to stat 'system'");
+ 	}
+ 	sz = sb.st_size;
+ 	fprintf (stderr, "System is %d kB\n", sz/1024);
+ #endif
  	sys_size = (sz + 15) / 16;
  	if (sys_size > SYS_SIZE)
  		die("System is too big");
diff -c -r linux//arch/i386/ibcs/Makefile linux_patched//arch/i386/ibcs/Makefile
*** linux//arch/i386/ibcs/Makefile	Sun Nov 27 18:19:53 1994
--- linux_patched//arch/i386/ibcs/Makefile	Sun Aug 27 18:17:48 1995
***************
*** 7,12 ****
--- 7,14 ----
  #
  # Note 2! The CFLAGS definitions are now in the main makefile...
  
+ .S.o:
+ 	$(CC) $(CFLAGS) -c -traditional $< -o $*.s
  .S.s:
  	$(CPP) -traditional $< -o $*.s
  .c.s:
diff -c -r linux//arch/i386/kernel/Makefile linux_patched//arch/i386/kernel/Makefile
*** linux//arch/i386/kernel/Makefile	Mon Jan 16 05:17:34 1995
--- linux_patched//arch/i386/kernel/Makefile	Sun Aug 27 18:17:48 1995
***************
*** 13,20 ****
  	$(AS) -o $*.o $<
  .c.o:
  	$(CC) $(CFLAGS) -c $<
! .S.s:
! 	$(CPP) -D__ASSEMBLY__ -traditional $< -o $*.s
  .S.o:
  	$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
  
--- 13,20 ----
  	$(AS) -o $*.o $<
  .c.o:
  	$(CC) $(CFLAGS) -c $<
! #.S.s:
! #	$(CPP) -D__ASSEMBLY__ -traditional $< -o $*.s
  .S.o:
  	$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
  
***************
*** 22,31 ****
  
  all: kernel.o head.o
  
! head.o: head.s
  
! head.s: head.S $(TOPDIR)/include/linux/tasks.h
! 	$(CPP) -traditional -o $*.s $<
  
  kernel.o: $(OBJS)
  	$(LD) -r -o kernel.o $(OBJS)
--- 22,32 ----
  
  all: kernel.o head.o
  
! #head.o: head.s
  
! head.o: head.S $(TOPDIR)/include/linux/tasks.h
! 	$(CC) -D__ASSEMBLY__ -traditional -c $*.S -o $*.o
! #	$(CPP) -traditional -o $*.s $<
  
  kernel.o: $(OBJS)
  	$(LD) -r -o kernel.o $(OBJS)
diff -c -r linux//arch/i386/kernel/entry.S linux_patched//arch/i386/kernel/entry.S
*** linux//arch/i386/kernel/entry.S	Tue Jan  3 13:15:08 1995
--- linux_patched//arch/i386/kernel/entry.S	Sun Aug 27 18:17:48 1995
***************
*** 41,46 ****
--- 41,47 ----
   */
  
  #include <linux/sys.h>
+ #include <linux/linkage.h>
  #include <asm/segment.h>
  
  EBX		= 0x00
***************
*** 82,96 ****
  
  ENOSYS = 38
  
- .globl _system_call,_lcall7
- .globl _device_not_available, _coprocessor_error
- .globl _divide_error,_debug,_nmi,_int3,_overflow,_bounds,_invalid_op
- .globl _double_fault,_coprocessor_segment_overrun
- .globl _invalid_TSS,_segment_not_present,_stack_segment
- .globl _general_protection,_reserved
- .globl _alignment_check,_page_fault
- .globl ret_from_sys_call, _sys_call_table
- 
  #define SAVE_ALL \
  	cld; \
  	push %gs; \
--- 83,88 ----
***************
*** 113,119 ****
  #define RESTORE_ALL \
  	cmpw $(KERNEL_CS),CS(%esp); \
  	je 1f;   \
! 	movl _current,%eax; \
  	movl dbgreg7(%eax),%ebx; \
  	movl %ebx,%db7;	\
  1:	popl %ebx; \
--- 105,111 ----
  #define RESTORE_ALL \
  	cmpw $(KERNEL_CS),CS(%esp); \
  	je 1f;   \
! 	movl SYMBOL_NAME(current),%eax; \
  	movl dbgreg7(%eax),%ebx; \
  	movl %ebx,%db7;	\
  1:	popl %ebx; \
***************
*** 130,137 ****
  	addl $4,%esp; \
  	iret
  
! .align 4
! _lcall7:
  	pushfl			# We get a different stack layout with call gates,
  	pushl %eax		# which has to be cleaned up later..
  	SAVE_ALL
--- 122,128 ----
  	addl $4,%esp; \
  	iret
  
! ENTRY(lcall7)
  	pushfl			# We get a different stack layout with call gates,
  	pushl %eax		# which has to be cleaned up later..
  	SAVE_ALL
***************
*** 142,148 ****
  	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
  	movl %ecx,CS(%esp)	#
  	movl %esp,%eax
! 	movl _current,%edx
  	pushl %eax
  	movl exec_domain(%edx),%edx	# Get the execution domain
  	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
--- 133,139 ----
  	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
  	movl %ecx,CS(%esp)	#
  	movl %esp,%eax
! 	movl SYMBOL_NAME(current),%edx
  	pushl %eax
  	movl exec_domain(%edx),%edx	# Get the execution domain
  	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
***************
*** 150,179 ****
  	popl %eax
  	jmp ret_from_sys_call
  
! .align 4
  handle_bottom_half:
  	pushfl
! 	incl _intr_count
  	sti
! 	call _do_bottom_half
  	popfl
! 	decl _intr_count
  	jmp 9f
! .align 4
  reschedule:
  	pushl $ret_from_sys_call
! 	jmp _schedule
! .align 4
! _system_call:
  	pushl %eax			# save orig_eax
  	SAVE_ALL
  	movl $-ENOSYS,EAX(%esp)
  	cmpl $(NR_syscalls),%eax
  	jae ret_from_sys_call
! 	movl _sys_call_table(,%eax,4),%eax
  	testl %eax,%eax
  	je ret_from_sys_call
! 	movl _current,%ebx
  	andl $~CF_MASK,EFLAGS(%esp)	# clear carry - assume no errors
  	movl $0,errno(%ebx)
  	movl %db6,%edx
--- 141,170 ----
  	popl %eax
  	jmp ret_from_sys_call
  
! 	ALIGN
  handle_bottom_half:
  	pushfl
! 	incl SYMBOL_NAME(intr_count)
  	sti
! 	call SYMBOL_NAME(do_bottom_half)
  	popfl
! 	decl SYMBOL_NAME(intr_count)
  	jmp 9f
! 	ALIGN
  reschedule:
  	pushl $ret_from_sys_call
! 	jmp SYMBOL_NAME(schedule)
! 
! ENTRY(system_call)
  	pushl %eax			# save orig_eax
  	SAVE_ALL
  	movl $-ENOSYS,EAX(%esp)
  	cmpl $(NR_syscalls),%eax
  	jae ret_from_sys_call
! 	movl SYMBOL_NAME(sys_call_table)(,%eax,4),%eax
  	testl %eax,%eax
  	je ret_from_sys_call
! 	movl SYMBOL_NAME(current),%ebx
  	andl $~CF_MASK,EFLAGS(%esp)	# clear carry - assume no errors
  	movl $0,errno(%ebx)
  	movl %db6,%edx
***************
*** 188,212 ****
  	movl %edx,EAX(%esp)
  	orl $(CF_MASK),EFLAGS(%esp)	# set carry to indicate error
  	jmp ret_from_sys_call
! .align 4
! 1:	call _syscall_trace
  	movl ORIG_EAX(%esp),%eax
! 	call _sys_call_table(,%eax,4)
  	movl %eax,EAX(%esp)		# save the return value
! 	movl _current,%eax
  	movl errno(%eax),%edx
  	negl %edx
  	je 1f
  	movl %edx,EAX(%esp)
  	orl $(CF_MASK),EFLAGS(%esp)	# set carry to indicate error
! 1:	call _syscall_trace
  
! 	.align 4,0x90
  ret_from_sys_call:
! 	cmpl $0,_intr_count
  	jne 2f
! 9:	movl _bh_mask,%eax
! 	andl _bh_active,%eax
  	jne handle_bottom_half
  	movl EFLAGS(%esp),%eax		# check VM86 flag: CS/SS are
  	testl $(VM_MASK),%eax		# different then
--- 179,204 ----
  	movl %edx,EAX(%esp)
  	orl $(CF_MASK),EFLAGS(%esp)	# set carry to indicate error
  	jmp ret_from_sys_call
! 	ALIGN
! 1:	call SYMBOL_NAME(syscall_trace)
  	movl ORIG_EAX(%esp),%eax
! 	call SYMBOL_NAME(sys_call_table)(,%eax,4)
  	movl %eax,EAX(%esp)		# save the return value
! 	movl SYMBOL_NAME(current),%eax
  	movl errno(%eax),%edx
  	negl %edx
  	je 1f
  	movl %edx,EAX(%esp)
  	orl $(CF_MASK),EFLAGS(%esp)	# set carry to indicate error
! 1:	call SYMBOL_NAME(syscall_trace)
  
! 	ALIGN
! 	.globl ret_from_sys_call
  ret_from_sys_call:
! 	cmpl $0,SYMBOL_NAME(intr_count)
  	jne 2f
! 9:	movl SYMBOL_NAME(bh_mask),%eax
! 	andl SYMBOL_NAME(bh_active),%eax
  	jne handle_bottom_half
  	movl EFLAGS(%esp),%eax		# check VM86 flag: CS/SS are
  	testl $(VM_MASK),%eax		# different then
***************
*** 217,226 ****
  	orl $(IF_MASK),%eax		# these just try to make sure
  	andl $~NT_MASK,%eax		# the program doesn't do anything
  	movl %eax,EFLAGS(%esp)		# stupid
! 	cmpl $0,_need_resched
  	jne reschedule
! 	movl _current,%eax
! 	cmpl _task,%eax			# task[0] cannot have signals
  	je 2f
  	cmpl $0,state(%eax)		# state
  	jne reschedule
--- 209,218 ----
  	orl $(IF_MASK),%eax		# these just try to make sure
  	andl $~NT_MASK,%eax		# the program doesn't do anything
  	movl %eax,EFLAGS(%esp)		# stupid
! 	cmpl $0,SYMBOL_NAME(need_resched)
  	jne reschedule
! 	movl SYMBOL_NAME(current),%eax
! 	cmpl SYMBOL_NAME(task),%eax	# task[0] cannot have signals
  	je 2f
  	cmpl $0,state(%eax)		# state
  	jne reschedule
***************
*** 232,264 ****
  	andl signal(%eax),%ecx
  	jne signal_return
  2:	RESTORE_ALL
! .align 4
  signal_return:
  	movl %esp,%ecx
  	pushl %ecx
  	testl $(VM_MASK),EFLAGS(%ecx)
  	jne v86_signal_return
  	pushl %ebx
! 	call _do_signal
  	popl %ebx
  	popl %ebx
  	RESTORE_ALL
! .align 4
  v86_signal_return:
! 	call _save_v86_state
  	movl %eax,%esp
  	pushl %eax
  	pushl %ebx
! 	call _do_signal
  	popl %ebx
  	popl %ebx
  	RESTORE_ALL
  
! .align 4
! _divide_error:
  	pushl $0		# no error code
! 	pushl $_do_divide_error
! .align 4,0x90
  error_code:
  	push %fs
  	push %es
--- 224,255 ----
  	andl signal(%eax),%ecx
  	jne signal_return
  2:	RESTORE_ALL
! 	ALIGN
  signal_return:
  	movl %esp,%ecx
  	pushl %ecx
  	testl $(VM_MASK),EFLAGS(%ecx)
  	jne v86_signal_return
  	pushl %ebx
! 	call SYMBOL_NAME(do_signal)
  	popl %ebx
  	popl %ebx
  	RESTORE_ALL
! 	ALIGN
  v86_signal_return:
! 	call SYMBOL_NAME(save_v86_state)
  	movl %eax,%esp
  	pushl %eax
  	pushl %ebx
! 	call SYMBOL_NAME(do_signal)
  	popl %ebx
  	popl %ebx
  	RESTORE_ALL
  
! ENTRY(divide_error)
  	pushl $0		# no error code
! 	pushl $ SYMBOL_NAME(do_divide_error)
! 	ALIGN
  error_code:
  	push %fs
  	push %es
***************
*** 287,293 ****
  	movl $(USER_DS),%edx
  	mov %dx,%fs
  	pushl %eax
! 	movl _current,%eax
  	movl %db6,%edx
  	movl %edx,dbgreg6(%eax)  # save current hardware debugging status
  	popl %eax
--- 278,284 ----
  	movl $(USER_DS),%edx
  	mov %dx,%fs
  	pushl %eax
! 	movl SYMBOL_NAME(current),%eax
  	movl %db6,%edx
  	movl %edx,dbgreg6(%eax)  # save current hardware debugging status
  	popl %eax
***************
*** 295,544 ****
  	addl $8,%esp
  	jmp ret_from_sys_call
  
! .align 4
! _coprocessor_error:
  	pushl $0
! 	pushl $_do_coprocessor_error
  	jmp error_code
  
! .align 4
! _device_not_available:
  	pushl $-1		# mark this as an int
  	SAVE_ALL
  	pushl $ret_from_sys_call
  	movl %cr0,%eax
  	testl $0x4,%eax			# EM (math emulation bit)
! 	je _math_state_restore
  	pushl $0		# temporary storage for ORIG_EIP
! 	call _math_emulate
  	addl $4,%esp
  	ret
  
! .align 4
! _debug:
  	pushl $0
! 	pushl $_do_debug
  	jmp error_code
  
! .align 4
! _nmi:
  	pushl $0
! 	pushl $_do_nmi
  	jmp error_code
  
! .align 4
! _int3:
  	pushl $0
! 	pushl $_do_int3
  	jmp error_code
  
! .align 4
! _overflow:
  	pushl $0
! 	pushl $_do_overflow
  	jmp error_code
  
! .align 4
! _bounds:
  	pushl $0
! 	pushl $_do_bounds
  	jmp error_code
  
! .align 4
! _invalid_op:
  	pushl $0
! 	pushl $_do_invalid_op
  	jmp error_code
  
! .align 4
! _coprocessor_segment_overrun:
  	pushl $0
! 	pushl $_do_coprocessor_segment_overrun
  	jmp error_code
  
! .align 4
! _reserved:
  	pushl $0
! 	pushl $_do_reserved
  	jmp error_code
  
! .align 4
! _double_fault:
! 	pushl $_do_double_fault
  	jmp error_code
  
! .align 4
! _invalid_TSS:
! 	pushl $_do_invalid_TSS
  	jmp error_code
  
! .align 4
! _segment_not_present:
! 	pushl $_do_segment_not_present
  	jmp error_code
  
! .align 4
! _stack_segment:
! 	pushl $_do_stack_segment
  	jmp error_code
  
! .align 4
! _general_protection:
! 	pushl $_do_general_protection
  	jmp error_code
  
! .align 4
! _alignment_check:
! 	pushl $_do_alignment_check
  	jmp error_code
  
! .align 4
! _page_fault:
! 	pushl $_do_page_fault
  	jmp error_code
  
  .data
! .align 4
! _sys_call_table:
! 	.long _sys_setup		/* 0 */
! 	.long _sys_exit
! 	.long _sys_fork
! 	.long _sys_read
! 	.long _sys_write
! 	.long _sys_open			/* 5 */
! 	.long _sys_close
! 	.long _sys_waitpid
! 	.long _sys_creat
! 	.long _sys_link
! 	.long _sys_unlink		/* 10 */
! 	.long _sys_execve
! 	.long _sys_chdir
! 	.long _sys_time
! 	.long _sys_mknod
! 	.long _sys_chmod		/* 15 */
! 	.long _sys_chown
! 	.long _sys_break
! 	.long _sys_stat
! 	.long _sys_lseek
! 	.long _sys_getpid		/* 20 */
! 	.long _sys_mount
! 	.long _sys_umount
! 	.long _sys_setuid
! 	.long _sys_getuid
! 	.long _sys_stime		/* 25 */
! 	.long _sys_ptrace
! 	.long _sys_alarm
! 	.long _sys_fstat
! 	.long _sys_pause
! 	.long _sys_utime		/* 30 */
! 	.long _sys_stty
! 	.long _sys_gtty
! 	.long _sys_access
! 	.long _sys_nice
! 	.long _sys_ftime		/* 35 */
! 	.long _sys_sync
! 	.long _sys_kill
! 	.long _sys_rename
! 	.long _sys_mkdir
! 	.long _sys_rmdir		/* 40 */
! 	.long _sys_dup
! 	.long _sys_pipe
! 	.long _sys_times
! 	.long _sys_prof
! 	.long _sys_brk			/* 45 */
! 	.long _sys_setgid
! 	.long _sys_getgid
! 	.long _sys_signal
! 	.long _sys_geteuid
! 	.long _sys_getegid		/* 50 */
! 	.long _sys_acct
! 	.long _sys_phys
! 	.long _sys_lock
! 	.long _sys_ioctl
! 	.long _sys_fcntl		/* 55 */
! 	.long _sys_mpx
! 	.long _sys_setpgid
! 	.long _sys_ulimit
! 	.long _sys_olduname
! 	.long _sys_umask		/* 60 */
! 	.long _sys_chroot
! 	.long _sys_ustat
! 	.long _sys_dup2
! 	.long _sys_getppid
! 	.long _sys_getpgrp		/* 65 */
! 	.long _sys_setsid
! 	.long _sys_sigaction
! 	.long _sys_sgetmask
! 	.long _sys_ssetmask
! 	.long _sys_setreuid		/* 70 */
! 	.long _sys_setregid
! 	.long _sys_sigsuspend
! 	.long _sys_sigpending
! 	.long _sys_sethostname
! 	.long _sys_setrlimit		/* 75 */
! 	.long _sys_getrlimit
! 	.long _sys_getrusage
! 	.long _sys_gettimeofday
! 	.long _sys_settimeofday
! 	.long _sys_getgroups		/* 80 */
! 	.long _sys_setgroups
! 	.long _sys_select
! 	.long _sys_symlink
! 	.long _sys_lstat
! 	.long _sys_readlink		/* 85 */
! 	.long _sys_uselib
! 	.long _sys_swapon
! 	.long _sys_reboot
! 	.long _sys_readdir
! 	.long _sys_mmap			/* 90 */
! 	.long _sys_munmap
! 	.long _sys_truncate
! 	.long _sys_ftruncate
! 	.long _sys_fchmod
! 	.long _sys_fchown		/* 95 */
! 	.long _sys_getpriority
! 	.long _sys_setpriority
! 	.long _sys_profil
! 	.long _sys_statfs
! 	.long _sys_fstatfs		/* 100 */
! 	.long _sys_ioperm
! 	.long _sys_socketcall
! 	.long _sys_syslog
! 	.long _sys_setitimer
! 	.long _sys_getitimer		/* 105 */
! 	.long _sys_newstat
! 	.long _sys_newlstat
! 	.long _sys_newfstat
! 	.long _sys_uname
! 	.long _sys_iopl			/* 110 */
! 	.long _sys_vhangup
! 	.long _sys_idle
! 	.long _sys_vm86
! 	.long _sys_wait4
! 	.long _sys_swapoff		/* 115 */
! 	.long _sys_sysinfo
! 	.long _sys_ipc
! 	.long _sys_fsync
! 	.long _sys_sigreturn
! 	.long _sys_clone		/* 120 */
! 	.long _sys_setdomainname
! 	.long _sys_newuname
! 	.long _sys_modify_ldt
! 	.long _sys_adjtimex
! 	.long _sys_mprotect		/* 125 */
! 	.long _sys_sigprocmask
! 	.long _sys_create_module
! 	.long _sys_init_module
! 	.long _sys_delete_module
! 	.long _sys_get_kernel_syms	/* 130 */
! 	.long _sys_quotactl
! 	.long _sys_getpgid
! 	.long _sys_fchdir
! 	.long _sys_bdflush
! 	.long _sys_sysfs		/* 135 */
! 	.long _sys_personality
  	.long 0				/* for afs_syscall */
! 	.long _sys_setfsuid
! 	.long _sys_setfsgid
! 	.long _sys_llseek		/* 140 */
  	.space (NR_syscalls-140)*4
--- 286,517 ----
  	addl $8,%esp
  	jmp ret_from_sys_call
  
! ENTRY(coprocessor_error)
  	pushl $0
! 	pushl $ SYMBOL_NAME(do_coprocessor_error)
  	jmp error_code
  
! ENTRY(device_not_available)
  	pushl $-1		# mark this as an int
  	SAVE_ALL
  	pushl $ret_from_sys_call
  	movl %cr0,%eax
  	testl $0x4,%eax			# EM (math emulation bit)
! 	je  SYMBOL_NAME(math_state_restore)
  	pushl $0		# temporary storage for ORIG_EIP
! 	call  SYMBOL_NAME(math_emulate)
  	addl $4,%esp
  	ret
  
! ENTRY(debug)
  	pushl $0
! 	pushl $ SYMBOL_NAME(do_debug)
  	jmp error_code
  
! ENTRY(nmi)
  	pushl $0
! 	pushl $ SYMBOL_NAME(do_nmi)
  	jmp error_code
  
! ENTRY(int3)
  	pushl $0
! 	pushl $ SYMBOL_NAME(do_int3)
  	jmp error_code
  
! ENTRY(overflow)
  	pushl $0
! 	pushl $ SYMBOL_NAME(do_overflow)
  	jmp error_code
  
! ENTRY(bounds)
  	pushl $0
! 	pushl $ SYMBOL_NAME(do_bounds)
  	jmp error_code
  
! ENTRY(invalid_op)
  	pushl $0
! 	pushl $ SYMBOL_NAME(do_invalid_op)
  	jmp error_code
  
! ENTRY(coprocessor_segment_overrun)
  	pushl $0
! 	pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)
  	jmp error_code
  
! ENTRY(reserved)
  	pushl $0
! 	pushl $ SYMBOL_NAME(do_reserved)
  	jmp error_code
  
! ENTRY(double_fault)
! 	pushl $ SYMBOL_NAME(do_double_fault)
  	jmp error_code
  
! ENTRY(invalid_TSS)
! 	pushl $ SYMBOL_NAME(do_invalid_TSS)
  	jmp error_code
  
! ENTRY(segment_not_present)
! 	pushl $ SYMBOL_NAME(do_segment_not_present)
  	jmp error_code
  
! ENTRY(stack_segment)
! 	pushl $ SYMBOL_NAME(do_stack_segment)
  	jmp error_code
  
! ENTRY(general_protection)
! 	pushl $ SYMBOL_NAME(do_general_protection)
  	jmp error_code
  
! ENTRY(alignment_check)
! 	pushl $ SYMBOL_NAME(do_alignment_check)
  	jmp error_code
  
! ENTRY(page_fault)
! 	pushl $ SYMBOL_NAME(do_page_fault)
  	jmp error_code
  
  .data
! ENTRY(sys_call_table)
! 	.long SYMBOL_NAME(sys_setup)		/* 0 */
! 	.long SYMBOL_NAME(sys_exit)
! 	.long SYMBOL_NAME(sys_fork)
! 	.long SYMBOL_NAME(sys_read)
! 	.long SYMBOL_NAME(sys_write)
! 	.long SYMBOL_NAME(sys_open)		/* 5 */
! 	.long SYMBOL_NAME(sys_close)
! 	.long SYMBOL_NAME(sys_waitpid)
! 	.long SYMBOL_NAME(sys_creat)
! 	.long SYMBOL_NAME(sys_link)
! 	.long SYMBOL_NAME(sys_unlink)		/* 10 */
! 	.long SYMBOL_NAME(sys_execve)
! 	.long SYMBOL_NAME(sys_chdir)
! 	.long SYMBOL_NAME(sys_time)
! 	.long SYMBOL_NAME(sys_mknod)
! 	.long SYMBOL_NAME(sys_chmod)		/* 15 */
! 	.long SYMBOL_NAME(sys_chown)
! 	.long SYMBOL_NAME(sys_break)
! 	.long SYMBOL_NAME(sys_stat)
! 	.long SYMBOL_NAME(sys_lseek)
! 	.long SYMBOL_NAME(sys_getpid)		/* 20 */
! 	.long SYMBOL_NAME(sys_mount)
! 	.long SYMBOL_NAME(sys_umount)
! 	.long SYMBOL_NAME(sys_setuid)
! 	.long SYMBOL_NAME(sys_getuid)
! 	.long SYMBOL_NAME(sys_stime)		/* 25 */
! 	.long SYMBOL_NAME(sys_ptrace)
! 	.long SYMBOL_NAME(sys_alarm)
! 	.long SYMBOL_NAME(sys_fstat)
! 	.long SYMBOL_NAME(sys_pause)
! 	.long SYMBOL_NAME(sys_utime)		/* 30 */
! 	.long SYMBOL_NAME(sys_stty)
! 	.long SYMBOL_NAME(sys_gtty)
! 	.long SYMBOL_NAME(sys_access)
! 	.long SYMBOL_NAME(sys_nice)
! 	.long SYMBOL_NAME(sys_ftime)		/* 35 */
! 	.long SYMBOL_NAME(sys_sync)
! 	.long SYMBOL_NAME(sys_kill)
! 	.long SYMBOL_NAME(sys_rename)
! 	.long SYMBOL_NAME(sys_mkdir)
! 	.long SYMBOL_NAME(sys_rmdir)		/* 40 */
! 	.long SYMBOL_NAME(sys_dup)
! 	.long SYMBOL_NAME(sys_pipe)
! 	.long SYMBOL_NAME(sys_times)
! 	.long SYMBOL_NAME(sys_prof)
! 	.long SYMBOL_NAME(sys_brk)		/* 45 */
! 	.long SYMBOL_NAME(sys_setgid)
! 	.long SYMBOL_NAME(sys_getgid)
! 	.long SYMBOL_NAME(sys_signal)
! 	.long SYMBOL_NAME(sys_geteuid)
! 	.long SYMBOL_NAME(sys_getegid)		/* 50 */
! 	.long SYMBOL_NAME(sys_acct)
! 	.long SYMBOL_NAME(sys_phys)
! 	.long SYMBOL_NAME(sys_lock)
! 	.long SYMBOL_NAME(sys_ioctl)
! 	.long SYMBOL_NAME(sys_fcntl)		/* 55 */
! 	.long SYMBOL_NAME(sys_mpx)
! 	.long SYMBOL_NAME(sys_setpgid)
! 	.long SYMBOL_NAME(sys_ulimit)
! 	.long SYMBOL_NAME(sys_olduname)
! 	.long SYMBOL_NAME(sys_umask)		/* 60 */
! 	.long SYMBOL_NAME(sys_chroot)
! 	.long SYMBOL_NAME(sys_ustat)
! 	.long SYMBOL_NAME(sys_dup2)
! 	.long SYMBOL_NAME(sys_getppid)
! 	.long SYMBOL_NAME(sys_getpgrp)		/* 65 */
! 	.long SYMBOL_NAME(sys_setsid)
! 	.long SYMBOL_NAME(sys_sigaction)
! 	.long SYMBOL_NAME(sys_sgetmask)
! 	.long SYMBOL_NAME(sys_ssetmask)
! 	.long SYMBOL_NAME(sys_setreuid)		/* 70 */
! 	.long SYMBOL_NAME(sys_setregid)
! 	.long SYMBOL_NAME(sys_sigsuspend)
! 	.long SYMBOL_NAME(sys_sigpending)
! 	.long SYMBOL_NAME(sys_sethostname)
! 	.long SYMBOL_NAME(sys_setrlimit)	/* 75 */
! 	.long SYMBOL_NAME(sys_getrlimit)
! 	.long SYMBOL_NAME(sys_getrusage)
! 	.long SYMBOL_NAME(sys_gettimeofday)
! 	.long SYMBOL_NAME(sys_settimeofday)
! 	.long SYMBOL_NAME(sys_getgroups)	/* 80 */
! 	.long SYMBOL_NAME(sys_setgroups)
! 	.long SYMBOL_NAME(sys_select)
! 	.long SYMBOL_NAME(sys_symlink)
! 	.long SYMBOL_NAME(sys_lstat)
! 	.long SYMBOL_NAME(sys_readlink)		/* 85 */
! 	.long SYMBOL_NAME(sys_uselib)
! 	.long SYMBOL_NAME(sys_swapon)
! 	.long SYMBOL_NAME(sys_reboot)
! 	.long SYMBOL_NAME(sys_readdir)
! 	.long SYMBOL_NAME(sys_mmap)		/* 90 */
! 	.long SYMBOL_NAME(sys_munmap)
! 	.long SYMBOL_NAME(sys_truncate)
! 	.long SYMBOL_NAME(sys_ftruncate)
! 	.long SYMBOL_NAME(sys_fchmod)
! 	.long SYMBOL_NAME(sys_fchown)		/* 95 */
! 	.long SYMBOL_NAME(sys_getpriority)
! 	.long SYMBOL_NAME(sys_setpriority)
! 	.long SYMBOL_NAME(sys_profil)
! 	.long SYMBOL_NAME(sys_statfs)
! 	.long SYMBOL_NAME(sys_fstatfs)		/* 100 */
! 	.long SYMBOL_NAME(sys_ioperm)
! 	.long SYMBOL_NAME(sys_socketcall)
! 	.long SYMBOL_NAME(sys_syslog)
! 	.long SYMBOL_NAME(sys_setitimer)
! 	.long SYMBOL_NAME(sys_getitimer)	/* 105 */
! 	.long SYMBOL_NAME(sys_newstat)
! 	.long SYMBOL_NAME(sys_newlstat)
! 	.long SYMBOL_NAME(sys_newfstat)
! 	.long SYMBOL_NAME(sys_uname)
! 	.long SYMBOL_NAME(sys_iopl)		/* 110 */
! 	.long SYMBOL_NAME(sys_vhangup)
! 	.long SYMBOL_NAME(sys_idle)
! 	.long SYMBOL_NAME(sys_vm86)
! 	.long SYMBOL_NAME(sys_wait4)
! 	.long SYMBOL_NAME(sys_swapoff)		/* 115 */
! 	.long SYMBOL_NAME(sys_sysinfo)
! 	.long SYMBOL_NAME(sys_ipc)
! 	.long SYMBOL_NAME(sys_fsync)
! 	.long SYMBOL_NAME(sys_sigreturn)
! 	.long SYMBOL_NAME(sys_clone)		/* 120 */
! 	.long SYMBOL_NAME(sys_setdomainname)
! 	.long SYMBOL_NAME(sys_newuname)
! 	.long SYMBOL_NAME(sys_modify_ldt)
! 	.long SYMBOL_NAME(sys_adjtimex)
! 	.long SYMBOL_NAME(sys_mprotect)		/* 125 */
! 	.long SYMBOL_NAME(sys_sigprocmask)
! 	.long SYMBOL_NAME(sys_create_module)
! 	.long SYMBOL_NAME(sys_init_module)
! 	.long SYMBOL_NAME(sys_delete_module)
! 	.long SYMBOL_NAME(sys_get_kernel_syms)	/* 130 */
! 	.long SYMBOL_NAME(sys_quotactl)
! 	.long SYMBOL_NAME(sys_getpgid)
! 	.long SYMBOL_NAME(sys_fchdir)
! 	.long SYMBOL_NAME(sys_bdflush)
! 	.long SYMBOL_NAME(sys_sysfs)		/* 135 */
! 	.long SYMBOL_NAME(sys_personality)
  	.long 0				/* for afs_syscall */
! 	.long SYMBOL_NAME(sys_setfsuid)
! 	.long SYMBOL_NAME(sys_setfsgid)
! 	.long SYMBOL_NAME(sys_llseek)		/* 140 */
  	.space (NR_syscalls-140)*4
diff -c -r linux//arch/i386/kernel/head.S linux_patched//arch/i386/kernel/head.S
*** linux//arch/i386/kernel/head.S	Mon Jan  2 13:19:59 1995
--- linux_patched//arch/i386/kernel/head.S	Sun Aug 27 18:17:48 1995
***************
*** 9,24 ****
   */
  
  .text
- .globl _idt,_gdt,
- .globl _swapper_pg_dir,_pg0
- .globl _empty_bad_page
- .globl _empty_bad_page_table
- .globl _empty_zero_page
- .globl _floppy_track_buffer
  
- #define __ASSEMBLY__
  #include <linux/tasks.h>
  #include <linux/fd.h>
  #include <asm/segment.h>
  
  #define CL_MAGIC_ADDR	0x90020
--- 9,18 ----
   */
  
  .text
  
  #include <linux/tasks.h>
  #include <linux/fd.h>
+ #include <linux/linkage.h>
  #include <asm/segment.h>
  
  #define CL_MAGIC_ADDR	0x90020
***************
*** 30,35 ****
--- 24,30 ----
   * swapper_pg_dir is the main page directory, address 0x00001000 (or at
   * address 0x00101000 for a compressed boot).
   */
+ 	.globl startup_32
  startup_32:
  	cld
  	movl $(KERNEL_DS),%eax
***************
*** 42,49 ****
   * Clear BSS first so that there are no surprises...
   */
  	xorl %eax,%eax
! 	movl $__edata,%edi
! 	movl $__end,%ecx
  	subl %edi,%ecx
  	cld
  	rep
--- 37,44 ----
   * Clear BSS first so that there are no surprises...
   */
  	xorl %eax,%eax
! 	movl $ SYMBOL_NAME(_edata),%edi
! 	movl $ SYMBOL_NAME(_end),%ecx
  	subl %edi,%ecx
  	cld
  	rep
***************
*** 71,77 ****
   * is for the command line.
   */
  	movl $0x90000,%esi
! 	movl $_empty_zero_page,%edi
  	movl $512,%ecx
  	cld
  	rep
--- 66,72 ----
   * is for the command line.
   */
  	movl $0x90000,%esi
! 	movl $ SYMBOL_NAME(empty_zero_page),%edi
  	movl $512,%ecx
  	cld
  	rep
***************
*** 82,88 ****
  	stosl
  	cmpw $(CL_MAGIC),CL_MAGIC_ADDR
  	jne 1f
! 	movl $_empty_zero_page+2048,%edi
  	movzwl CL_OFFSET,%esi
  	addl $(CL_BASE_ADDR),%esi
  	movl $2048,%ecx
--- 77,83 ----
  	stosl
  	cmpw $(CL_MAGIC),CL_MAGIC_ADDR
  	jne 1f
! 	movl $ SYMBOL_NAME(empty_zero_page)+2048,%edi
  	movzwl CL_OFFSET,%esi
  	addl $(CL_BASE_ADDR),%esi
  	movl $2048,%ecx
***************
*** 95,101 ****
   * apply at our cpl of 0 and the stack ought to be aligned already, and
   * we don't need to preserve eflags.
   */
! 	movl $3,_x86
  	pushfl			# push EFLAGS
  	popl %eax		# get EFLAGS
  	movl %eax,%ecx		# save original EFLAGS
--- 90,96 ----
   * apply at our cpl of 0 and the stack ought to be aligned already, and
   * we don't need to preserve eflags.
   */
! 	movl $3, SYMBOL_NAME(x86)
  	pushfl			# push EFLAGS
  	popl %eax		# get EFLAGS
  	movl %eax,%ecx		# save original EFLAGS
***************
*** 107,113 ****
  	xorl %ecx,%eax		# change in flags
  	andl $0x40000,%eax	# check if AC bit changed
  	je is386
! 	movl $4,_x86
  	movl %ecx,%eax
  	xorl $0x200000,%eax	# check ID flag
  	pushl %eax
--- 102,108 ----
  	xorl %ecx,%eax		# change in flags
  	andl $0x40000,%eax	# check if AC bit changed
  	je is386
! 	movl $4,SYMBOL_NAME(x86)
  	movl %ecx,%eax
  	xorl $0x200000,%eax	# check ID flag
  	pushl %eax
***************
*** 124,142 ****
  	.byte 0x0f, 0xa2	# check the processor type
  	movb %al, %cl		# save reg for future use
  	andb $0x0f,%ah		# mask processor family
! 	movb %ah, _x86
  	andb $0xf0, %eax	# mask model
  	shrb $4, %al
! 	movb %al, _x86_model
  	andb $0x0f, %cl		# mask mask revision
! 	movb %cl, _x86_mask
! 	movl %edx, _x86_capability
  	/* get vendor info */
  	xorl %eax, %eax			# call CPUID with 0 -> return vendor ID
  	.byte 0x0f, 0xa2		# CPUID
! 	movl %ebx, _x86_vendor_id	# lo 4 chars
! 	movl %edx, _x86_vendor_id+4	# next 4 chars
! 	movl %ecx, _x86_vendor_id+8	# last 4 chars
  
  	movl %cr0,%eax		# 486+
  	andl $0x80000011,%eax	# Save PG,PE,ET
--- 119,137 ----
  	.byte 0x0f, 0xa2	# check the processor type
  	movb %al, %cl		# save reg for future use
  	andb $0x0f,%ah		# mask processor family
! 	movb %ah,SYMBOL_NAME(x86)
  	andb $0xf0, %eax	# mask model
  	shrb $4, %al
! 	movb %al,SYMBOL_NAME(x86_model)
  	andb $0x0f, %cl		# mask mask revision
! 	movb %cl,SYMBOL_NAME(x86_mask)
! 	movl %edx,SYMBOL_NAME(x86_capability)
  	/* get vendor info */
  	xorl %eax, %eax			# call CPUID with 0 -> return vendor ID
  	.byte 0x0f, 0xa2		# CPUID
! 	movl %ebx,SYMBOL_NAME(x86_vendor_id)	# lo 4 chars
! 	movl %edx,SYMBOL_NAME(x86_vendor_id)+4	# next 4 chars
! 	movl %ecx,SYMBOL_NAME(x86_vendor_id)+8	# last 4 chars
  
  	movl %cr0,%eax		# 486+
  	andl $0x80000011,%eax	# Save PG,PE,ET
***************
*** 171,177 ****
  	pushl %eax
  	pushl %eax
  	cld			# gcc2 wants the direction flag cleared at all times
! 	call _start_kernel
  L6:
  	jmp L6			# main should never return here, but
  				# just in case, we know what happens.
--- 166,172 ----
  	pushl %eax
  	pushl %eax
  	cld			# gcc2 wants the direction flag cleared at all times
! 	call SYMBOL_NAME(start_kernel)
  L6:
  	jmp L6			# main should never return here, but
  				# just in case, we know what happens.
***************
*** 180,186 ****
   * We depend on ET to be correct. This checks for 287/387.
   */
  check_x87:
! 	movb $0,_hard_math
  	clts
  	fninit
  	fstsw %ax
--- 175,181 ----
   * We depend on ET to be correct. This checks for 287/387.
   */
  check_x87:
! 	movb $0,SYMBOL_NAME(hard_math)
  	clts
  	fninit
  	fstsw %ax
***************
*** 190,197 ****
  	xorl $4,%eax		/* set EM */
  	movl %eax,%cr0
  	ret
! .align 2
! 1:	movb $1,_hard_math
  	.byte 0xDB,0xE4		/* fsetpm for 287, ignored by 387 */
  	ret
  
--- 185,192 ----
  	xorl $4,%eax		/* set EM */
  	movl %eax,%cr0
  	ret
! 	ALIGN
! 1:	movb $1,SYMBOL_NAME(hard_math)
  	.byte 0xDB,0xE4		/* fsetpm for 287, ignored by 387 */
  	ret
  
***************
*** 211,217 ****
  	movw %dx,%ax		/* selector = 0x0010 = cs */
  	movw $0x8E00,%dx	/* interrupt gate - dpl=0, present */
  
! 	lea _idt,%edi
  	mov $256,%ecx
  rp_sidt:
  	movl %eax,(%edi)
--- 206,212 ----
  	movw %dx,%ax		/* selector = 0x0010 = cs */
  	movw $0x8E00,%dx	/* interrupt gate - dpl=0, present */
  
! 	lea SYMBOL_NAME(idt),%edi
  	mov $256,%ecx
  rp_sidt:
  	movl %eax,(%edi)
***************
*** 233,256 ****
   * (ref: update, 25Sept92)  -- croutons@crunchy.uucp 
   * (ref: 92.10.11 - Linus Torvalds. Corrected 16M limit - no upper memory limit)
   */
! .align 2
  setup_paging:
  	movl $1024*2,%ecx		/* 2 pages - swapper_pg_dir+1 page table */
  	xorl %eax,%eax
! 	movl $_swapper_pg_dir,%edi	/* swapper_pg_dir is at 0x1000 */
  	cld;rep;stosl
  /* Identity-map the kernel in low 4MB memory for ease of transition */
! 	movl $_pg0+7,_swapper_pg_dir		/* set present bit/user r/w */
  /* But the real place is at 0xC0000000 */
! 	movl $_pg0+7,_swapper_pg_dir+3072	/* set present bit/user r/w */
! 	movl $_pg0+4092,%edi
  	movl $0x03ff007,%eax		/*  4Mb - 4096 + 7 (r/w user,p) */
  	std
  1:	stosl			/* fill the page backwards - more efficient :-) */
  	subl $0x1000,%eax
  	jge 1b
  	cld
! 	movl $_swapper_pg_dir,%eax
  	movl %eax,%cr3			/* cr3 - page directory start */
  	movl %cr0,%eax
  	orl $0x80000000,%eax
--- 228,253 ----
   * (ref: update, 25Sept92)  -- croutons@crunchy.uucp 
   * (ref: 92.10.11 - Linus Torvalds. Corrected 16M limit - no upper memory limit)
   */
! 	ALIGN
  setup_paging:
  	movl $1024*2,%ecx		/* 2 pages - swapper_pg_dir+1 page table */
  	xorl %eax,%eax
! 	movl $ SYMBOL_NAME(swapper_pg_dir),%edi	/* swapper_pg_dir is at 0x1000 */
  	cld;rep;stosl
  /* Identity-map the kernel in low 4MB memory for ease of transition */
! /* set present bit/user r/w */
! 	movl $ SYMBOL_NAME(pg0)+7,SYMBOL_NAME(swapper_pg_dir)
  /* But the real place is at 0xC0000000 */
! /* set present bit/user r/w */
! 	movl $ SYMBOL_NAME(pg0)+7,SYMBOL_NAME(swapper_pg_dir)+3072
! 	movl $ SYMBOL_NAME(pg0)+4092,%edi
  	movl $0x03ff007,%eax		/*  4Mb - 4096 + 7 (r/w user,p) */
  	std
  1:	stosl			/* fill the page backwards - more efficient :-) */
  	subl $0x1000,%eax
  	jge 1b
  	cld
! 	movl $ SYMBOL_NAME(swapper_pg_dir),%eax
  	movl %eax,%cr3			/* cr3 - page directory start */
  	movl %cr0,%eax
  	orl $0x80000000,%eax
***************
*** 268,289 ****
   * by 2-3k.  This would be a good thing to do at some point.....
   */
  .org 0x1000
! _swapper_pg_dir:
  /*
   * The page tables are initialized to only 4MB here - the final page
   * tables are set up later depending on memory size.
   */
  .org 0x2000
! _pg0:
  
  .org 0x3000
! _empty_bad_page:
  
  .org 0x4000
! _empty_bad_page_table:
  
  .org 0x5000
! _empty_zero_page:
  
  .org 0x6000
  /*
--- 265,286 ----
   * by 2-3k.  This would be a good thing to do at some point.....
   */
  .org 0x1000
! ENTRY(swapper_pg_dir)
  /*
   * The page tables are initialized to only 4MB here - the final page
   * tables are set up later depending on memory size.
   */
  .org 0x2000
! ENTRY(pg0)
  
  .org 0x3000
! ENTRY(empty_bad_page)
  
  .org 0x4000
! ENTRY(empty_bad_page_table)
  
  .org 0x5000
! ENTRY(empty_zero_page)
  
  .org 0x6000
  /*
***************
*** 292,308 ****
   * sector read/write can mess it up. It can contain one full cylinder (sic) of
   * data (36*2*512 bytes).
   */
! _floppy_track_buffer:
  	.fill 512*2*MAX_BUFFER_SECTORS,1,0
  	
  stack_start:
! 	.long _init_user_stack+4096
  	.long KERNEL_DS
  
  /* This is the default interrupt "handler" :-) */
  int_msg:
  	.asciz "Unknown interrupt\n"
! .align 2
  ignore_int:
  	cld
  	pushl %eax
--- 289,305 ----
   * sector read/write can mess it up. It can contain one full cylinder (sic) of
   * data (36*2*512 bytes).
   */
! ENTRY(floppy_track_buffer)
  	.fill 512*2*MAX_BUFFER_SECTORS,1,0
  	
  stack_start:
! 	.long SYMBOL_NAME(init_user_stack)+4096
  	.long KERNEL_DS
  
  /* This is the default interrupt "handler" :-) */
  int_msg:
  	.asciz "Unknown interrupt\n"
! 	ALIGN
  ignore_int:
  	cld
  	pushl %eax
***************
*** 316,322 ****
  	mov %ax,%es
  	mov %ax,%fs
  	pushl $int_msg
! 	call _printk
  	popl %eax
  	pop %fs
  	pop %es
--- 313,319 ----
  	mov %ax,%es
  	mov %ax,%fs
  	pushl $int_msg
! 	call SYMBOL_NAME(printk)
  	popl %eax
  	pop %fs
  	pop %es
***************
*** 329,356 ****
  /*
   * The interrupt descriptor table has room for 256 idt's
   */
! .align 4
  .word 0
  idt_descr:
  	.word 256*8-1		# idt contains 256 entries
! 	.long 0xc0000000+_idt
  
! .align 4
! _idt:
  	.fill 256,8,0		# idt is uninitialized
  
! .align 4
  .word 0
  gdt_descr:
  	.word (8+2*NR_TASKS)*8-1
! 	.long 0xc0000000+_gdt
  
  /*
   * This gdt setup gives the kernel a 1GB address space at virtual
   * address 0xC0000000 - space enough for expansion, I hope.
   */
! .align 4
! _gdt:
  	.quad 0x0000000000000000	/* NULL descriptor */
  	.quad 0x0000000000000000	/* not used */
  	.quad 0xc0c39a000000ffff	/* 0x10 kernel 1GB code at 0xC0000000 */
--- 326,351 ----
  /*
   * The interrupt descriptor table has room for 256 idt's
   */
! 	ALIGN
  .word 0
  idt_descr:
  	.word 256*8-1		# idt contains 256 entries
! 	.long 0xc0000000+SYMBOL_NAME(idt)
  
! ENTRY(idt)
  	.fill 256,8,0		# idt is uninitialized
  
! 	ALIGN
  .word 0
  gdt_descr:
  	.word (8+2*NR_TASKS)*8-1
! 	.long 0xc0000000+SYMBOL_NAME(gdt)
  
  /*
   * This gdt setup gives the kernel a 1GB address space at virtual
   * address 0xC0000000 - space enough for expansion, I hope.
   */
! ENTRY(gdt)
  	.quad 0x0000000000000000	/* NULL descriptor */
  	.quad 0x0000000000000000	/* not used */
  	.quad 0xc0c39a000000ffff	/* 0x10 kernel 1GB code at 0xC0000000 */
diff -c -r linux//arch/i386/kernel/process.c linux_patched//arch/i386/kernel/process.c
*** linux//arch/i386/kernel/process.c	Fri May 26 05:25:32 1995
--- linux_patched//arch/i386/kernel/process.c	Sun Aug 27 18:17:48 1995
***************
*** 194,199 ****
--- 194,224 ----
  }
  
  /*
+  * fill in the fpu structure for a core dump..
+  */
+ int dump_fpu (struct user_i387_struct* fpu)
+ {
+ 	int fpvalid;
+ 
+ /* Flag indicating the math stuff is valid. We don't support this for the
+    soft-float routines yet */
+ 	if (hard_math) {
+ 		if ((fpvalid = current->used_math) != 0) {
+ 			if (last_task_used_math == current)
+ 				__asm__("clts ; fnsave %0": :"m" (*fpu));
+ 			else
+ 				memcpy(fpu,&current->tss.i387.hard,sizeof(*fpu));
+ 		}
+ 	} else {
+ 		/* we should dump the emulator state here, but we need to
+ 		   convert it into standard 387 format first.. */
+ 		fpvalid = 0;
+ 	}
+ 
+ 	return fpvalid;
+ }
+ 
+ /*
   * fill in the user structure for a core dump..
   */
  void dump_thread(struct pt_regs * regs, struct user * dump)
***************
*** 216,235 ****
  
  	dump->regs = *regs;
  
! /* Flag indicating the math stuff is valid. We don't support this for the
!    soft-float routines yet */
! 	if (hard_math) {
! 		if ((dump->u_fpvalid = current->used_math) != 0) {
! 			if (last_task_used_math == current)
! 				__asm__("clts ; fnsave %0": :"m" (dump->i387));
! 			else
! 				memcpy(&dump->i387,&current->tss.i387.hard,sizeof(dump->i387));
! 		}
! 	} else {
! 		/* we should dump the emulator state here, but we need to
! 		   convert it into standard 387 format first.. */
! 		dump->u_fpvalid = 0;
! 	}
  }
  
  asmlinkage int sys_fork(struct pt_regs regs)
--- 241,247 ----
  
  	dump->regs = *regs;
  
! 	dump->u_fpvalid = dump_fpu (&dump->i387);
  }
  
  asmlinkage int sys_fork(struct pt_regs regs)
diff -c -r linux//arch/i386/kernel/setup.c linux_patched//arch/i386/kernel/setup.c
*** linux//arch/i386/kernel/setup.c	Thu Feb 23 11:31:58 1995
--- linux_patched//arch/i386/kernel/setup.c	Sun Aug 27 18:17:48 1995
***************
*** 55,61 ****
  unsigned char aux_device_present;
  extern int ramdisk_size;
  extern int root_mountflags;
! extern int etext, edata, end;
  
  extern char empty_zero_page[PAGE_SIZE];
  
--- 55,61 ----
  unsigned char aux_device_present;
  extern int ramdisk_size;
  extern int root_mountflags;
! extern int _etext, _edata, _end;
  
  extern char empty_zero_page[PAGE_SIZE];
  
***************
*** 95,105 ****
  #endif
  	if (MOUNT_ROOT_RDONLY)
  		root_mountflags |= MS_RDONLY;
! 	memory_start = (unsigned long) &end;
  	init_task.mm->start_code = TASK_SIZE;
! 	init_task.mm->end_code = TASK_SIZE + (unsigned long) &etext;
! 	init_task.mm->end_data = TASK_SIZE + (unsigned long) &edata;
! 	init_task.mm->brk = TASK_SIZE + (unsigned long) &end;
  
  	for (;;) {
  		if (c == ' ' && *(unsigned long *)from == *(unsigned long *)"mem=") {
--- 95,105 ----
  #endif
  	if (MOUNT_ROOT_RDONLY)
  		root_mountflags |= MS_RDONLY;
! 	memory_start = (unsigned long) &_end;
  	init_task.mm->start_code = TASK_SIZE;
! 	init_task.mm->end_code = TASK_SIZE + (unsigned long) &_etext;
! 	init_task.mm->end_data = TASK_SIZE + (unsigned long) &_edata;
! 	init_task.mm->brk = TASK_SIZE + (unsigned long) &_end;
  
  	for (;;) {
  		if (c == ' ' && *(unsigned long *)from == *(unsigned long *)"mem=") {
diff -c -r linux//arch/i386/kernel/traps.c linux_patched//arch/i386/kernel/traps.c
*** linux//arch/i386/kernel/traps.c	Wed Feb  8 11:54:00 1995
--- linux_patched//arch/i386/kernel/traps.c	Sun Aug 27 18:17:48 1995
***************
*** 99,105 ****
  	unsigned long esp;
  	unsigned short ss;
  	unsigned long *stack, addr, module_start, module_end;
! 	extern char start_kernel, etext;
  
  	esp = (unsigned long) &regs->esp;
  	ss = KERNEL_DS;
--- 99,105 ----
  	unsigned long esp;
  	unsigned short ss;
  	unsigned long *stack, addr, module_start, module_end;
! 	extern char start_kernel, _etext;
  
  	esp = (unsigned long) &regs->esp;
  	ss = KERNEL_DS;
***************
*** 147,153 ****
  		 * out the call path that was taken.
  		 */
  		if (((addr >= (unsigned long) &start_kernel) &&
! 		     (addr <= (unsigned long) &etext)) ||
  		    ((addr >= module_start) && (addr <= module_end))) {
  			if (i && ((i % 8) == 0))
  				printk("\n       ");
--- 147,153 ----
  		 * out the call path that was taken.
  		 */
  		if (((addr >= (unsigned long) &start_kernel) &&
! 		     (addr <= (unsigned long) &_etext)) ||
  		    ((addr >= module_start) && (addr <= module_end))) {
  			if (i && ((i % 8) == 0))
  				printk("\n       ");
diff -c -r linux//arch/i386/math-emu/div_Xsig.S linux_patched//arch/i386/math-emu/div_Xsig.S
*** linux//arch/i386/math-emu/div_Xsig.S	Mon Aug  1 05:19:13 1994
--- linux_patched//arch/i386/math-emu/div_Xsig.S	Sun Aug 27 18:17:49 1995
***************
*** 74,84 ****
  
  
  .text
! 	.align 2,144
! 
! .globl _div_Xsig
! 
! _div_Xsig:
  	pushl	%ebp
  	movl	%esp,%ebp
  #ifndef NON_REENTRANT_FPU
--- 74,80 ----
  
  
  .text
! ENTRY(div_Xsig)
  	pushl	%ebp
  	movl	%esp,%ebp
  #ifndef NON_REENTRANT_FPU
diff -c -r linux//arch/i386/math-emu/div_small.S linux_patched//arch/i386/math-emu/div_small.S
*** linux//arch/i386/math-emu/div_small.S	Wed Dec  1 12:44:16 1993
--- linux_patched//arch/i386/math-emu/div_small.S	Sun Aug 27 18:17:49 1995
***************
*** 17,27 ****
  #include "fpu_asm.h"
  
  .text
! 	.align 2,144
! 
! .globl _div_small
! 
! _div_small:
  	pushl	%ebp
  	movl	%esp,%ebp
  
--- 17,23 ----
  #include "fpu_asm.h"
  
  .text
! ENTRY(div_small)
  	pushl	%ebp
  	movl	%esp,%ebp
  
diff -c -r linux//arch/i386/math-emu/fpu_asm.h linux_patched//arch/i386/math-emu/fpu_asm.h
*** linux//arch/i386/math-emu/fpu_asm.h	Wed Dec  1 12:44:16 1993
--- linux_patched//arch/i386/math-emu/fpu_asm.h	Sun Aug 27 18:17:49 1995
***************
*** 9,17 ****
  #ifndef _FPU_ASM_H_
  #define _FPU_ASM_H_
  
  #include "fpu_emu.h"
  
! #define	EXCEPTION	_exception
  
  
  #define PARAM1	8(%ebp)
--- 9,18 ----
  #ifndef _FPU_ASM_H_
  #define _FPU_ASM_H_
  
+ #include <linux/linkage.h>
  #include "fpu_emu.h"
  
! #define	EXCEPTION	SYMBOL_NAME(exception)
  
  
  #define PARAM1	8(%ebp)
diff -c -r linux//arch/i386/math-emu/mul_Xsig.S linux_patched//arch/i386/math-emu/mul_Xsig.S
*** linux//arch/i386/math-emu/mul_Xsig.S	Mon Aug  1 05:19:13 1994
--- linux_patched//arch/i386/math-emu/mul_Xsig.S	Sun Aug 27 18:17:49 1995
***************
*** 24,32 ****
  #include "fpu_asm.h"
  
  .text
! 	.align 2,144
! .globl _mul32_Xsig
! _mul32_Xsig:
  	pushl %ebp
  	movl %esp,%ebp
  	subl $16,%esp
--- 24,30 ----
  #include "fpu_asm.h"
  
  .text
! ENTRY(mul32_Xsig)
  	pushl %ebp
  	movl %esp,%ebp
  	subl $16,%esp
***************
*** 66,74 ****
  	ret
  
  
! 	.align 2,144
! .globl _mul64_Xsig
! _mul64_Xsig:
  	pushl %ebp
  	movl %esp,%ebp
  	subl $16,%esp
--- 64,70 ----
  	ret
  
  
! ENTRY(mul64_Xsig)
  	pushl %ebp
  	movl %esp,%ebp
  	subl $16,%esp
***************
*** 121,129 ****
  
  
  
! 	.align 2,144
! .globl _mul_Xsig_Xsig
! _mul_Xsig_Xsig:
  	pushl %ebp
  	movl %esp,%ebp
  	subl $16,%esp
--- 117,123 ----
  
  
  
! ENTRY(mul_Xsig_Xsig)
  	pushl %ebp
  	movl %esp,%ebp
  	subl $16,%esp
diff -c -r linux//arch/i386/math-emu/polynom_Xsig.S linux_patched//arch/i386/math-emu/polynom_Xsig.S
*** linux//arch/i386/math-emu/polynom_Xsig.S	Mon Aug  1 05:19:15 1994
--- linux_patched//arch/i386/math-emu/polynom_Xsig.S	Sun Aug 27 18:17:49 1995
***************
*** 36,44 ****
  #define OVERFLOWED      -16(%ebp)	/* addition overflow flag */
  
  .text
! 	.align 2,144
! .globl _polynomial_Xsig
! _polynomial_Xsig:
  	pushl	%ebp
  	movl	%esp,%ebp
  	subl	$32,%esp
--- 36,42 ----
  #define OVERFLOWED      -16(%ebp)	/* addition overflow flag */
  
  .text
! ENTRY(polynomial_Xsig)
  	pushl	%ebp
  	movl	%esp,%ebp
  	subl	$32,%esp
diff -c -r linux//arch/i386/math-emu/reg_div.S linux_patched//arch/i386/math-emu/reg_div.S
*** linux//arch/i386/math-emu/reg_div.S	Thu Jun  2 07:28:27 1994
--- linux_patched//arch/i386/math-emu/reg_div.S	Sun Aug 27 18:17:49 1995
***************
*** 19,28 ****
  
  
  .text
! 	.align 2
! 
! .globl	_reg_div
! _reg_div:
  	pushl	%ebp
  	movl	%esp,%ebp
  #ifndef NON_REENTRANT_FPU
--- 19,25 ----
  
  
  .text
! ENTRY(reg_div)
  	pushl	%ebp
  	movl	%esp,%ebp
  #ifndef NON_REENTRANT_FPU
***************
*** 47,53 ****
  	cmpl	EXP_UNDER,EXP(%esi)
  	jg	xL_arg1_not_denormal
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
--- 44,50 ----
  	cmpl	EXP_UNDER,EXP(%esi)
  	jg	xL_arg1_not_denormal
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
***************
*** 55,61 ****
  	cmpl	EXP_UNDER,EXP(%ebx)
  	jg	xL_arg2_not_denormal
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
--- 52,58 ----
  	cmpl	EXP_UNDER,EXP(%ebx)
  	jg	xL_arg2_not_denormal
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
***************
*** 75,81 ****
  	addl	EXP_BIAS,%edx
  	movl	%edx,EXP(%edi)
  
! 	jmp	_divide_kernel
  
  
  /*-----------------------------------------------------------------------*/
--- 72,78 ----
  	addl	EXP_BIAS,%edx
  	movl	%edx,EXP(%edi)
  
! 	jmp	SYMBOL_NAME(divide_kernel)
  
  
  /*-----------------------------------------------------------------------*/
***************
*** 92,105 ****
  	pushl	%edi			/* Destination */
  	pushl	%esi
  	pushl	%ebx			/* Ordering is important here */
! 	call	_real_2op_NaN
  	jmp	LDiv_exit
  
  /* Invalid operations */
  L_zero_zero:
  L_inf_inf:
  	pushl	%edi			/* Destination */
! 	call	_arith_invalid		/* 0/0 or Infinity/Infinity */
  	jmp	LDiv_exit
  
  L_no_NaN_arg:
--- 89,102 ----
  	pushl	%edi			/* Destination */
  	pushl	%esi
  	pushl	%ebx			/* Ordering is important here */
! 	call	SYMBOL_NAME(real_2op_NaN)
  	jmp	LDiv_exit
  
  /* Invalid operations */
  L_zero_zero:
  L_inf_inf:
  	pushl	%edi			/* Destination */
! 	call	SYMBOL_NAME(arith_invalid) /* 0/0 or Infinity/Infinity */
  	jmp	LDiv_exit
  
  L_no_NaN_arg:
***************
*** 126,132 ****
  	cmpl	EXP_UNDER,EXP(%ebx)
  	jg	L_copy_arg1		/* Answer is Inf */
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  #endif DENORM_OPERAND
--- 123,129 ----
  	cmpl	EXP_UNDER,EXP(%ebx)
  	jg	L_copy_arg1		/* Answer is Inf */
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  #endif DENORM_OPERAND
***************
*** 151,157 ****
  	movb	SIGN(%esi),%al
  	xorb	SIGN(%ebx),%al
  	pushl	%eax			/* lower 8 bits have the sign */
! 	call	_divide_by_zero
  	jmp	LDiv_exit
  
  L_arg2_not_zero:
--- 148,154 ----
  	movb	SIGN(%esi),%al
  	xorb	SIGN(%ebx),%al
  	pushl	%eax			/* lower 8 bits have the sign */
! 	call	SYMBOL_NAME(divide_by_zero)
  	jmp	LDiv_exit
  
  L_arg2_not_zero:
***************
*** 165,171 ****
  	cmpl	EXP_UNDER,EXP(%esi)
  	jg	L_return_zero		/* Answer is zero */
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  #endif DENORM_OPERAND
--- 162,168 ----
  	cmpl	EXP_UNDER,EXP(%esi)
  	jg	L_return_zero		/* Answer is zero */
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  #endif DENORM_OPERAND
***************
*** 185,191 ****
  	cmpl	EXP_UNDER,EXP(%ebx)
  	jg	L_copy_arg1		/* Answer is zero */
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  #endif DENORM_OPERAND
--- 182,188 ----
  	cmpl	EXP_UNDER,EXP(%ebx)
  	jg	L_copy_arg1		/* Answer is zero */
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  #endif DENORM_OPERAND
***************
*** 241,251 ****
  	call	EXCEPTION
  
  	/* Generate a NaN for unknown tags */
! 	movl	_CONST_QNaN,%eax
  	movl	%eax,(%edi)
! 	movl	_CONST_QNaN+4,%eax
  	movl	%eax,SIGL(%edi)
! 	movl	_CONST_QNaN+8,%eax
  	movl	%eax,SIGH(%edi)
  	jmp	LDiv_exit		/* %eax is nz */
  #endif PARANOID
--- 238,248 ----
  	call	EXCEPTION
  
  	/* Generate a NaN for unknown tags */
! 	movl	SYMBOL_NAME(CONST_QNaN),%eax
  	movl	%eax,(%edi)
! 	movl	SYMBOL_NAME(CONST_QNaN)+4,%eax
  	movl	%eax,SIGL(%edi)
! 	movl	SYMBOL_NAME(CONST_QNaN)+8,%eax
  	movl	%eax,SIGH(%edi)
  	jmp	LDiv_exit		/* %eax is nz */
  #endif PARANOID
diff -c -r linux//arch/i386/math-emu/reg_norm.S linux_patched//arch/i386/math-emu/reg_norm.S
*** linux//arch/i386/math-emu/reg_norm.S	Tue Jan 11 09:10:49 1994
--- linux_patched//arch/i386/math-emu/reg_norm.S	Sun Aug 27 18:17:49 1995
***************
*** 18,28 ****
  
  
  .text
! 
! 	.align 2,144
! .globl _normalize
! 
! _normalize:
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%ebx
--- 18,24 ----
  
  
  .text
! ENTRY(normalize)
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%ebx
***************
*** 34,40 ****
  	je	L_ok
  
  	pushl	$0x220
! 	call	_exception
  	addl	$4,%esp
  
  L_ok:
--- 30,36 ----
  	je	L_ok
  
  	pushl	$0x220
! 	call	SYMBOL_NAME(exception)
  	addl	$4,%esp
  
  L_ok:
***************
*** 86,108 ****
  
  L_underflow:
  	push	%ebx
! 	call	_arith_underflow
  	pop	%ebx
  	jmp	L_exit
  
  L_overflow:
  	push	%ebx
! 	call	_arith_overflow
  	pop	%ebx
  	jmp	L_exit
  
  
  
  /* Normalise without reporting underflow or overflow */
! 	.align 2,144
! .globl _normalize_nuo
! 
! _normalize_nuo:
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%ebx
--- 82,101 ----
  
  L_underflow:
  	push	%ebx
! 	call	SYMBOL_NAME(arith_underflow)
  	pop	%ebx
  	jmp	L_exit
  
  L_overflow:
  	push	%ebx
! 	call	SYMBOL_NAME(arith_overflow)
  	pop	%ebx
  	jmp	L_exit
  
  
  
  /* Normalise without reporting underflow or overflow */
! ENTRY(normalize_nuo)
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%ebx
***************
*** 114,120 ****
  	je	L_ok_nuo
  
  	pushl	$0x221
! 	call	_exception
  	addl	$4,%esp
  
  L_ok_nuo:
--- 107,113 ----
  	je	L_ok_nuo
  
  	pushl	$0x221
! 	call	SYMBOL_NAME(exception)
  	addl	$4,%esp
  
  L_ok_nuo:
diff -c -r linux//arch/i386/math-emu/reg_round.S linux_patched//arch/i386/math-emu/reg_round.S
*** linux//arch/i386/math-emu/reg_round.S	Fri Aug 19 11:06:50 1994
--- linux_patched//arch/i386/math-emu/reg_round.S	Sun Aug 27 18:17:49 1995
***************
*** 101,114 ****
  
  
  .text
- 	.align 2,144
  .globl fpu_reg_round
  .globl fpu_reg_round_sqrt
  .globl fpu_Arith_exit
- .globl _round_reg
  
  /* Entry point when called from C */
! _round_reg:
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
--- 101,112 ----
  
  
  .text
  .globl fpu_reg_round
  .globl fpu_reg_round_sqrt
  .globl fpu_Arith_exit
  
  /* Entry point when called from C */
! ENTRY(round_reg)
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
***************
*** 435,441 ****
   */
  xL_precision_lost_up:
  	push	%eax
! 	call	_set_precision_flag_up
  	popl	%eax
  	jmp	xL_no_precision_loss
  
--- 433,439 ----
   */
  xL_precision_lost_up:
  	push	%eax
! 	call	SYMBOL_NAME(set_precision_flag_up)
  	popl	%eax
  	jmp	xL_no_precision_loss
  
***************
*** 445,451 ****
   */
  xL_precision_lost_down:
  	push	%eax
! 	call	_set_precision_flag_down
  	popl	%eax
  	jmp	xL_no_precision_loss
  
--- 443,449 ----
   */
  xL_precision_lost_down:
  	push	%eax
! 	call	SYMBOL_NAME(set_precision_flag_down)
  	popl	%eax
  	jmp	xL_no_precision_loss
  
***************
*** 598,604 ****
  	/* There must be a masked underflow */
  	push	%eax
  	pushl	EX_Underflow
! 	call	_exception
  	popl	%eax
  	popl	%eax
  	jmp	xL_Normalised
--- 596,602 ----
  	/* There must be a masked underflow */
  	push	%eax
  	pushl	EX_Underflow
! 	call	SYMBOL_NAME(exception)
  	popl	%eax
  	popl	%eax
  	jmp	xL_Normalised
***************
*** 610,621 ****
   */
  L_underflow_to_zero:
  	push	%eax
! 	call	_set_precision_flag_down
  	popl	%eax
  
  	push	%eax
  	pushl	EX_Underflow
! 	call	_exception
  	popl	%eax
  	popl	%eax
  
--- 608,619 ----
   */
  L_underflow_to_zero:
  	push	%eax
! 	call	SYMBOL_NAME(set_precision_flag_down)
  	popl	%eax
  
  	push	%eax
  	pushl	EX_Underflow
! 	call	SYMBOL_NAME(exception)
  	popl	%eax
  	popl	%eax
  
***************
*** 628,634 ****
  /* The operations resulted in a number too large to represent. */
  L_overflow:
  	push	%edi
! 	call	_arith_overflow
  	pop	%edi
  	jmp	fpu_reg_round_exit
  
--- 626,632 ----
  /* The operations resulted in a number too large to represent. */
  L_overflow:
  	push	%edi
! 	call	SYMBOL_NAME(arith_overflow)
  	pop	%edi
  	jmp	fpu_reg_round_exit
  
diff -c -r linux//arch/i386/math-emu/reg_u_add.S linux_patched//arch/i386/math-emu/reg_u_add.S
*** linux//arch/i386/math-emu/reg_u_add.S	Wed Dec  1 12:44:16 1993
--- linux_patched//arch/i386/math-emu/reg_u_add.S	Sun Aug 27 18:17:49 1995
***************
*** 29,37 ****
  #include "control_w.h"
  
  .text
! 	.align 2,144
! .globl _reg_u_add
! _reg_u_add:
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
--- 29,35 ----
  #include "control_w.h"
  
  .text
! ENTRY(reg_u_add)
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
***************
*** 45,51 ****
  	cmpl	EXP_UNDER,EXP(%esi)
  	jg	xOp1_not_denorm
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
--- 43,49 ----
  	cmpl	EXP_UNDER,EXP(%esi)
  	jg	xOp1_not_denorm
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
***************
*** 53,59 ****
  	cmpl	EXP_UNDER,EXP(%edi)
  	jg	xOp2_not_denorm
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
--- 51,57 ----
  	cmpl	EXP_UNDER,EXP(%edi)
  	jg	xOp2_not_denorm
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
diff -c -r linux//arch/i386/math-emu/reg_u_div.S linux_patched//arch/i386/math-emu/reg_u_div.S
*** linux//arch/i386/math-emu/reg_u_div.S	Thu Jun  2 07:28:28 1994
--- linux_patched//arch/i386/math-emu/reg_u_div.S	Sun Aug 27 18:17:49 1995
***************
*** 69,81 ****
  
  
  .text
! 	.align 2,144
! 
! .globl _reg_u_div
! 
! .globl _divide_kernel
! 
! _reg_u_div:
  	pushl	%ebp
  	movl	%esp,%ebp
  #ifndef NON_REENTRANT_FPU
--- 69,75 ----
  
  
  .text
! ENTRY(reg_u_div)
  	pushl	%ebp
  	movl	%esp,%ebp
  #ifndef NON_REENTRANT_FPU
***************
*** 95,101 ****
  	cmpl	EXP_UNDER,%eax
  	jg	xOp1_not_denorm
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
--- 89,95 ----
  	cmpl	EXP_UNDER,%eax
  	jg	xOp1_not_denorm
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
***************
*** 104,117 ****
  	cmpl	EXP_UNDER,%eax
  	jg	xOp2_not_denorm
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
  xOp2_not_denorm:
  #endif DENORM_OPERAND
  
! _divide_kernel:
  #ifdef PARANOID
  /*	testl	$0x80000000, SIGH(%esi)	// Dividend */
  /*	je	L_bugged */
--- 98,111 ----
  	cmpl	EXP_UNDER,%eax
  	jg	xOp2_not_denorm
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
  xOp2_not_denorm:
  #endif DENORM_OPERAND
  
! ENTRY(divide_kernel)
  #ifdef PARANOID
  /*	testl	$0x80000000, SIGH(%esi)	// Dividend */
  /*	je	L_bugged */
diff -c -r linux//arch/i386/math-emu/reg_u_mul.S linux_patched//arch/i386/math-emu/reg_u_mul.S
*** linux//arch/i386/math-emu/reg_u_mul.S	Thu Jun  2 07:28:28 1994
--- linux_patched//arch/i386/math-emu/reg_u_mul.S	Sun Aug 27 18:17:50 1995
***************
*** 44,53 ****
  
  
  .text
! 	.align 2,144
! 
! .globl _reg_u_mul
! _reg_u_mul:
  	pushl	%ebp
  	movl	%esp,%ebp
  #ifndef NON_REENTRANT_FPU
--- 44,50 ----
  
  
  .text
! ENTRY(reg_u_mul)
  	pushl	%ebp
  	movl	%esp,%ebp
  #ifndef NON_REENTRANT_FPU
***************
*** 73,79 ****
  	cmpl	EXP_UNDER,%eax
  	jg	xOp1_not_denorm
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
--- 70,76 ----
  	cmpl	EXP_UNDER,%eax
  	jg	xOp1_not_denorm
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
***************
*** 82,88 ****
  	cmpl	EXP_UNDER,%eax
  	jg	xOp2_not_denorm
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
--- 79,85 ----
  	cmpl	EXP_UNDER,%eax
  	jg	xOp2_not_denorm
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
diff -c -r linux//arch/i386/math-emu/reg_u_sub.S linux_patched//arch/i386/math-emu/reg_u_sub.S
*** linux//arch/i386/math-emu/reg_u_sub.S	Wed Dec  1 12:44:16 1993
--- linux_patched//arch/i386/math-emu/reg_u_sub.S	Sun Aug 27 18:17:50 1995
***************
*** 30,38 ****
  #include "control_w.h"
  
  .text
! 	.align 2,144
! .globl _reg_u_sub
! _reg_u_sub:
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
--- 30,36 ----
  #include "control_w.h"
  
  .text
! ENTRY(reg_u_sub)
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
***************
*** 46,52 ****
  	cmpl	EXP_UNDER,EXP(%esi)
  	jg	xOp1_not_denorm
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
--- 44,50 ----
  	cmpl	EXP_UNDER,EXP(%esi)
  	jg	xOp1_not_denorm
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
***************
*** 54,60 ****
  	cmpl	EXP_UNDER,EXP(%edi)
  	jg	xOp2_not_denorm
  
! 	call	_denormal_operand
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
--- 52,58 ----
  	cmpl	EXP_UNDER,EXP(%edi)
  	jg	xOp2_not_denorm
  
! 	call	SYMBOL_NAME(denormal_operand)
  	orl	%eax,%eax
  	jnz	fpu_Arith_exit
  
diff -c -r linux//arch/i386/math-emu/round_Xsig.S linux_patched//arch/i386/math-emu/round_Xsig.S
*** linux//arch/i386/math-emu/round_Xsig.S	Mon Aug  1 05:19:15 1994
--- linux_patched//arch/i386/math-emu/round_Xsig.S	Sun Aug 27 18:17:50 1995
***************
*** 22,32 ****
  
  
  .text
! 
! 	.align 2,144
! .globl _round_Xsig
! 
! _round_Xsig:
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%ebx		/* Reserve some space */
--- 22,28 ----
  
  
  .text
! ENTRY(round_Xsig)
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%ebx		/* Reserve some space */
***************
*** 86,95 ****
  
  
  
! 	.align 2,144
! .globl _norm_Xsig
! 
! _norm_Xsig:
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%ebx		/* Reserve some space */
--- 82,88 ----
  
  
  
! ENTRY(norm_Xsig)
  	pushl	%ebp
  	movl	%esp,%ebp
  	pushl	%ebx		/* Reserve some space */
diff -c -r linux//arch/i386/math-emu/shr_Xsig.S linux_patched//arch/i386/math-emu/shr_Xsig.S
*** linux//arch/i386/math-emu/shr_Xsig.S	Mon Aug  1 05:19:16 1994
--- linux_patched//arch/i386/math-emu/shr_Xsig.S	Sun Aug 27 18:17:50 1995
***************
*** 21,30 ****
  #include "fpu_asm.h"
  
  .text
! 	.align 2,144
! 
! 	.globl	_shr_Xsig
! _shr_Xsig:
  	push	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
--- 21,27 ----
  #include "fpu_asm.h"
  
  .text
! ENTRY(shr_Xsig)
  	push	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
diff -c -r linux//arch/i386/math-emu/wm_shrx.S linux_patched//arch/i386/math-emu/wm_shrx.S
*** linux//arch/i386/math-emu/wm_shrx.S	Wed Dec  1 12:44:16 1993
--- linux_patched//arch/i386/math-emu/wm_shrx.S	Sun Aug 27 18:17:50 1995
***************
*** 17,24 ****
  #include "fpu_asm.h"
  
  .text
- 	.align 2,144
- 
  /*---------------------------------------------------------------------------+
   |   unsigned shrx(void *arg1, unsigned arg2)                                |
   |                                                                           |
--- 17,22 ----
***************
*** 33,41 ****
   |   Results returned in the 64 bit arg and eax.                             |
   +---------------------------------------------------------------------------*/
  
! 	.globl	_shrx
! 
! _shrx:
  	push	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
--- 31,37 ----
   |   Results returned in the 64 bit arg and eax.                             |
   +---------------------------------------------------------------------------*/
  
! ENTRY(shrx)
  	push	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
***************
*** 113,120 ****
   |   part which has been shifted out of the arg.                             |
   |   Results returned in the 64 bit arg and eax.                             |
   +---------------------------------------------------------------------------*/
! 	.globl	_shrxs
! _shrxs:
  	push	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
--- 109,115 ----
   |   part which has been shifted out of the arg.                             |
   |   Results returned in the 64 bit arg and eax.                             |
   +---------------------------------------------------------------------------*/
! ENTRY(shrxs)
  	push	%ebp
  	movl	%esp,%ebp
  	pushl	%esi
diff -c -r linux//arch/i386/math-emu/wm_sqrt.S linux_patched//arch/i386/math-emu/wm_sqrt.S
*** linux//arch/i386/math-emu/wm_sqrt.S	Thu Jun  2 07:28:28 1994
--- linux_patched//arch/i386/math-emu/wm_sqrt.S	Sun Aug 27 18:17:50 1995
***************
*** 74,83 ****
  
  
  .text
! 	.align 2,144
! 
! .globl _wm_sqrt
! _wm_sqrt:
  	pushl	%ebp
  	movl	%esp,%ebp
  #ifndef NON_REENTRANT_FPU
--- 74,80 ----
  
  
  .text
! ENTRY(wm_sqrt)
  	pushl	%ebp
  	movl	%esp,%ebp
  #ifndef NON_REENTRANT_FPU
diff -c -r linux//arch/i386/mm/init.c linux_patched//arch/i386/mm/init.c
*** linux//arch/i386/mm/init.c	Wed Mar 22 12:54:33 1995
--- linux_patched//arch/i386/mm/init.c	Sun Aug 27 18:17:50 1995
***************
*** 161,167 ****
  	int reservedpages = 0;
  	int datapages = 0;
  	unsigned long tmp;
! 	extern int etext;
  
  	end_mem &= PAGE_MASK;
  	high_memory = end_mem;
--- 161,167 ----
  	int reservedpages = 0;
  	int datapages = 0;
  	unsigned long tmp;
! 	extern int _etext;
  
  	end_mem &= PAGE_MASK;
  	high_memory = end_mem;
***************
*** 194,200 ****
  		if (mem_map[MAP_NR(tmp)]) {
  			if (tmp >= 0xA0000 && tmp < 0x100000)
  				reservedpages++;
! 			else if (tmp < (unsigned long) &etext)
  				codepages++;
  			else
  				datapages++;
--- 194,200 ----
  		if (mem_map[MAP_NR(tmp)]) {
  			if (tmp >= 0xA0000 && tmp < 0x100000)
  				reservedpages++;
! 			else if (tmp < (unsigned long) &_etext)
  				codepages++;
  			else
  				datapages++;
diff -c -r linux//drivers/char/vt.c linux_patched//drivers/char/vt.c
*** linux//drivers/char/vt.c	Wed Feb 15 08:50:55 1995
--- linux_patched//drivers/char/vt.c	Sat Aug 26 23:34:11 1995
***************
*** 95,111 ****
   * comments - KDMKTONE doesn't put the process to sleep.
   */
  static void
! kd_nosound(unsigned long ignored)
  {
  	/* disable counter 2 */
  	outb(inb_p(0x61)&0xFC, 0x61);
  	return;
  }
  
! void
! kd_mksound(unsigned int count, unsigned int ticks)
  {
! 	static struct timer_list sound_timer = { NULL, NULL, 0, 0, kd_nosound };
  
  	cli();
  	del_timer(&sound_timer);
--- 95,115 ----
   * comments - KDMKTONE doesn't put the process to sleep.
   */
  static void
! _kd_nosound(unsigned long ignored)
  {
  	/* disable counter 2 */
  	outb(inb_p(0x61)&0xFC, 0x61);
  	return;
  }
  
! void	(*kd_nosound)(unsigned long ignored) = _kd_nosound;
! 
! static void
! _kd_mksound(unsigned int count, unsigned int ticks)
  {
! 	static struct timer_list sound_timer = { NULL, NULL, 0, 0, 0 };
! 
! 	sound_timer.function = kd_nosound;
  
  	cli();
  	del_timer(&sound_timer);
***************
*** 128,133 ****
--- 132,139 ----
  	return;
  }
  
+ void	(*kd_mksound)(unsigned int count, unsigned int ticks) = _kd_mksound;
+ 
  /*
   * We handle the console-specific ioctl's here.  We allow the
   * capability to modify any console, not just the fg_console. 
diff -c -r linux//drivers/char/vt_kern.h linux_patched//drivers/char/vt_kern.h
*** linux//drivers/char/vt_kern.h	Thu Oct 13 12:07:09 1994
--- linux_patched//drivers/char/vt_kern.h	Sat Aug 26 23:34:11 1995
***************
*** 20,26 ****
  	struct wait_queue *paste_wait;
  } *vt_cons[MAX_NR_CONSOLES];
  
! void kd_mksound(unsigned int count, unsigned int ticks);
  int vc_allocate(unsigned int console);
  int vc_cons_allocated(unsigned int console);
  int vc_resize(unsigned long lines, unsigned long cols);
--- 20,26 ----
  	struct wait_queue *paste_wait;
  } *vt_cons[MAX_NR_CONSOLES];
  
! extern void (*kd_mksound)(unsigned int count, unsigned int ticks);
  int vc_allocate(unsigned int console);
  int vc_cons_allocated(unsigned int console);
  int vc_resize(unsigned long lines, unsigned long cols);
Only in linux_patched//drivers/net: #3c501.c#
diff -c -r linux//drivers/net/de600.c linux_patched//drivers/net/de600.c
*** linux//drivers/net/de600.c	Tue Feb  7 09:43:23 1995
--- linux_patched//drivers/net/de600.c	Wed Feb  7 00:55:04 1996
***************
*** 846,848 ****
--- 846,849 ----
  	release_region(DE600_IO, 3);
  }
  #endif /* MODULE */
+ 
diff -c -r linux//drivers/scsi/53c7,8xx.c linux_patched//drivers/scsi/53c7,8xx.c
*** linux//drivers/scsi/53c7,8xx.c	Mon Jun 26 07:23:28 1995
--- linux_patched//drivers/scsi/53c7,8xx.c	Mon Jan 29 20:33:30 1996
***************
*** 2266,2278 ****
       * and SCSI recommended .5s selection timeout.
       */
  
      NCR53c7x0_write8(STIME0_REG_800, 
      	((14 << STIME0_800_SEL_SHIFT) & STIME0_800_SEL_MASK) 
  /* Disable HTH interrupt */
! #if 0
! 	| ((15 << STIME0_800_HTH_SHIFT) & STIME0_800_HTH_MASK)
  #endif
-     );
  
  
  
--- 2266,2284 ----
       * and SCSI recommended .5s selection timeout.
       */
  
+     /*
+      * The new gcc won't recognize preprocessing directives
+      * within macro args.
+      */
+ #if 0
      NCR53c7x0_write8(STIME0_REG_800, 
      	((14 << STIME0_800_SEL_SHIFT) & STIME0_800_SEL_MASK) 
  /* Disable HTH interrupt */
! 	| ((15 << STIME0_800_HTH_SHIFT) & STIME0_800_HTH_MASK));
! #else
!     NCR53c7x0_write8(STIME0_REG_800, 
!     	((14 << STIME0_800_SEL_SHIFT) & STIME0_800_SEL_MASK));
  #endif
  
  
  
diff -c -r linux//drivers/scsi/Makefile linux_patched//drivers/scsi/Makefile
*** linux//drivers/scsi/Makefile	Fri Apr 28 08:13:04 1995
--- linux_patched//drivers/scsi/Makefile	Wed Jan 31 02:09:26 1996
***************
*** 13,19 ****
  .c.o:
  	$(CC) $(CFLAGS) -c $<
  
! AHA152X	= -DDEBUG_AHA152X -DAUTOCONF
  
  ifeq (${CFLAGS},)
  CFLAGS = -D__KERNEL__=1 \
--- 13,19 ----
  .c.o:
  	$(CC) $(CFLAGS) -c $<
  
! AHA152X	= -DDEBUG_AHA152X -DAUTOCONF  -DIRQ=10 -DPORTBASE=0x340
  
  ifeq (${CFLAGS},)
  CFLAGS = -D__KERNEL__=1 \
Only in linux_patched//drivers/scsi: scsi_debug.c.old
diff -c -r linux//drivers/scsi/seagate.c linux_patched//drivers/scsi/seagate.c
*** linux//drivers/scsi/seagate.c	Fri Mar 24 15:18:00 1995
--- linux_patched//drivers/scsi/seagate.c	Mon Jan 29 20:33:32 1996
***************
*** 1105,1112 ****
  
  	cld
  
! 	movl _st0x_cr_sr, %%ebx
! 	movl _st0x_dr, %%edi
  	
  1:	movb (%%ebx), %%al\n"
  /*
--- 1105,1112 ----
  
  	cld
  
! 	movl " SYMBOL_NAME_STR(st0x_cr_sr) ", %%ebx
! 	movl " SYMBOL_NAME_STR(st0x_dr) ", %%edi
  	
  1:	movb (%%ebx), %%al\n"
  /*
***************
*** 1241,1248 ****
  	jz 2f
  
  	cld
! 	movl _st0x_cr_sr, %%esi
! 	movl _st0x_dr, %%ebx
  
  1:	movb (%%esi), %%al\n"
  /*
--- 1241,1248 ----
  	jz 2f
  
  	cld
! 	movl " SYMBOL_NAME_STR(st0x_cr_sr) ", %%esi
! 	movl " SYMBOL_NAME_STR(st0x_dr) ", %%ebx
  
  1:	movb (%%esi), %%al\n"
  /*
Only in linux_patched//drivers/sound: local.h
diff -c -r linux//fs/binfmt_elf.c linux_patched//fs/binfmt_elf.c
*** linux//fs/binfmt_elf.c	Sun Jun 11 16:45:10 1995
--- linux_patched//fs/binfmt_elf.c	Sun Aug 27 18:18:26 1995
***************
*** 18,23 ****
--- 18,24 ----
  #endif
  
  #include <linux/fs.h>
+ #include <linux/stat.h>
  #include <linux/sched.h>
  #include <linux/mm.h>
  #include <linux/mman.h>
***************
*** 31,36 ****
--- 32,38 ----
  #include <linux/malloc.h>
  #include <linux/shm.h>
  #include <linux/personality.h>
+ #include <linux/elfcore.h>
  
  #include <asm/segment.h>
  #include <asm/pgtable.h>
***************
*** 48,59 ****
  
  static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs);
  static int load_elf_library(int fd);
  
  struct linux_binfmt elf_format = {
  #ifndef MODULE
! 	NULL, NULL, load_elf_binary, load_elf_library, NULL
  #else
! 	NULL, &mod_use_count_, load_elf_binary, load_elf_library, NULL
  #endif
  };
  
--- 50,63 ----
  
  static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs);
  static int load_elf_library(int fd);
+ static int elf_core_dump(long signr, struct pt_regs * regs);
+ extern int dump_fpu (elf_fpregset_t *);
  
  struct linux_binfmt elf_format = {
  #ifndef MODULE
! 	NULL, NULL, load_elf_binary, load_elf_library, elf_core_dump
  #else
! 	NULL, &mod_use_count_, load_elf_binary, load_elf_library, elf_core_dump
  #endif
  };
  
***************
*** 741,746 ****
--- 745,1155 ----
  	return 0;
  }
  
+ /*
+  * ELF core dumper
+  *
+  * Modelled on fs/exec.c:aout_core_dump()
+  * Jeremy Fitzhardinge <jeremy@sw.oz.au>
+  */
+ /*
+  * These are the only things you should do on a core-file: use only these
+  * functions to write out all the necessary info.
+  */
+ static int dump_write(struct file *file, void *addr, int nr)
+ {
+ 	return file->f_op->write(file->f_inode, file, addr, nr) == nr;
+ }
+ 
+ static int dump_seek(struct file *file, off_t off)
+ {
+ 	if (file->f_op->lseek) {
+ 		if (file->f_op->lseek(file->f_inode, file, off, 0) != off)
+ 			return 0;
+ 	} else
+ 		file->f_pos = off;
+ 	return 1;
+ }
+ 
+ /*
+  * Decide whether a segment is worth dumping; default is yes to be
+  * sure (missing info is worse than too much; etc).
+  * Personally I'd include everything, and use the coredump limit...
+  *
+  * I think we should skip something. But I am not sure how. H.J.
+  */
+ static inline int maydump(struct vm_area_struct *vma)
+ {
+ #if 1
+ 	if (vma->vm_flags & (VM_WRITE|VM_GROWSUP|VM_GROWSDOWN))
+ 		return 1;
+ 	if (vma->vm_flags & (VM_READ|VM_EXEC|VM_EXECUTABLE|VM_SHARED))
+ 		return 0;
+ #endif
+ 	return 1;
+ }
+ 
+ #define roundup(x, y)  ((((x)+((y)-1))/(y))*(y))
+ 
+ /* An ELF note in memory */
+ struct memelfnote
+ {
+ 	char *name;
+ 	int type;
+ 	unsigned int datasz;
+ 	void *data;
+ };
+ 
+ static int notesize(struct memelfnote *en)
+ {
+ 	int sz;
+ 	
+ 	sz = sizeof(struct elf_note);
+ 	sz += roundup(strlen(en->name), 4);
+ 	sz += roundup(en->datasz, 4);
+ 	
+ 	return sz;
+ }
+ 
+ /* #define DEBUG */
+ 
+ #ifdef DEBUG
+ static void dump_regs(const char *str, elf_greg_t *r)
+ {
+ 	int i;
+ 	static const char *regs[] = { "ebx", "ecx", "edx", "esi", "edi", "ebp",
+ 					      "eax", "ds", "es", "fs", "gs",
+ 					      "orig_eax", "eip", "cs",
+ 					      "efl", "uesp", "ss"};
+ 	printk("Registers: %s\n", str);
+ 
+ 	for(i = 0; i < ELF_NGREG; i++)
+ 	{
+ 		unsigned long val = r[i];
+ 		printk("   %-2d %-5s=%08lx %lu\n", i, regs[i], val, val);
+ 	}
+ }
+ #endif
+ 
+ #define DUMP_WRITE(addr, nr)	\
+ 	do { if (!dump_write(file, (addr), (nr))) return 0; } while(0)
+ #define DUMP_SEEK(off)	\
+ 	do { if (!dump_seek(file, (off))) return 0; } while(0)
+ 
+ static int writenote(struct memelfnote *men, struct file *file)
+ {
+ 	struct elf_note en;
+ 
+ 	en.n_namesz = strlen(men->name);
+ 	en.n_descsz = men->datasz;
+ 	en.n_type = men->type;
+ 
+ 	DUMP_WRITE(&en, sizeof(en));
+ 	DUMP_WRITE(men->name, en.n_namesz);
+ 	/* XXX - cast from long long to long to avoid need for libgcc.a */
+ 	DUMP_SEEK(roundup((unsigned long)file->f_pos, 4));	/* XXX */
+ 	DUMP_WRITE(men->data, men->datasz);
+ 	DUMP_SEEK(roundup((unsigned long)file->f_pos, 4));	/* XXX */
+ 	
+ 	return 1;
+ }
+ #undef DUMP_WRITE
+ #undef DUMP_SEEK
+ 
+ #define DUMP_WRITE(addr, nr)	\
+ 	if (!dump_write(&file, (addr), (nr))) \
+ 		goto close_coredump;
+ #define DUMP_SEEK(off)	\
+ 	if (!dump_seek(&file, (off))) \
+ 		goto close_coredump;
+ /*
+  * Actual dumper
+  *
+  * This is a two-pass process; first we find the offsets of the bits,
+  * and then they are actually written out.  If we run out of core limit
+  * we just truncate.
+  */
+ static int elf_core_dump(long signr, struct pt_regs * regs)
+ {
+ 	int has_dumped = 0;
+ 	struct file file;
+ 	struct inode *inode;
+ 	unsigned short fs;
+ 	char corefile[6+sizeof(current->comm)];
+ 	int segs;
+ 	int i;
+ 	size_t size;
+ 	struct vm_area_struct *vma;
+ 	struct elfhdr elf;
+ 	off_t offset = 0, dataoff;
+ 	int limit = current->rlim[RLIMIT_CORE].rlim_cur;
+ 	int numnote = 4;
+ 	struct memelfnote notes[4];
+ 	struct elf_prstatus prstatus;	/* NT_PRSTATUS */
+ 	elf_fpregset_t fpu;		/* NT_PRFPREG */
+ 	struct elf_prpsinfo psinfo;	/* NT_PRPSINFO */
+ 	
+ 	if (!current->dumpable || limit < PAGE_SIZE)
+ 		return 0;
+ 	current->dumpable = 0;
+ 
+ #ifndef CONFIG_BINFMT_ELF
+ 	MOD_INC_USE_COUNT;
+ #endif
+ 
+ 	/* Count what's needed to dump, up to the limit of coredump size */
+ 	segs = 0;
+ 	size = 0;
+ 	for(vma = current->mm->mmap; vma != NULL; vma = vma->vm_next) {
+ 		int sz = vma->vm_end-vma->vm_start;
+ 		
+ 		if (!maydump(vma))
+ 			continue;
+ 
+ 		if (size+sz > limit)
+ 			break;
+ 		
+ 		segs++;
+ 		size += sz;
+ 	}
+ #ifdef DEBUG
+ 	printk("elf_core_dump: %d segs taking %d bytes\n", segs, size);
+ #endif
+ 
+ 	/* Set up header */
+ 	memcpy(elf.e_ident, ELFMAG, SELFMAG);
+ 	elf.e_ident[EI_CLASS] = ELFCLASS32;
+ 	elf.e_ident[EI_DATA] = ELFDATA2LSB;
+ 	elf.e_ident[EI_VERSION] = EV_CURRENT;
+ 	memset(elf.e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD);
+ 	
+ 	elf.e_type = ET_CORE;
+ 	elf.e_machine = EM_386;
+ 	elf.e_version = EV_CURRENT;
+ 	elf.e_entry = 0;
+ 	elf.e_phoff = sizeof(elf);
+ 	elf.e_shoff = 0;
+ 	elf.e_flags = 0;
+ 	elf.e_ehsize = sizeof(elf);
+ 	elf.e_phentsize = sizeof(struct elf_phdr);
+ 	elf.e_phnum = segs+1;		/* Include notes */
+ 	elf.e_shentsize = 0;
+ 	elf.e_shnum = 0;
+ 	elf.e_shstrndx = 0;
+ 	
+ 	fs = get_fs();
+ 	set_fs(KERNEL_DS);
+ 	memcpy(corefile,"core.",5);
+ #if 0
+ 	memcpy(corefile+5,current->comm,sizeof(current->comm));
+ #else
+ 	corefile[4] = '\0';
+ #endif
+ 	if (open_namei(corefile,O_CREAT | 2 | O_TRUNC,0600,&inode,NULL)) {
+ 		inode = NULL;
+ 		goto end_coredump;
+ 	}
+ 	if (!S_ISREG(inode->i_mode))
+ 		goto end_coredump;
+ 	if (!inode->i_op || !inode->i_op->default_file_ops)
+ 		goto end_coredump;
+ 	file.f_mode = 3;
+ 	file.f_flags = 0;
+ 	file.f_count = 1;
+ 	file.f_inode = inode;
+ 	file.f_pos = 0;
+ 	file.f_reada = 0;
+ 	file.f_op = inode->i_op->default_file_ops;
+ 	if (file.f_op->open)
+ 		if (file.f_op->open(inode,&file))
+ 			goto end_coredump;
+ 	if (!file.f_op->write)
+ 		goto close_coredump;
+ 	has_dumped = 1;
+ 
+ 	DUMP_WRITE(&elf, sizeof(elf));
+ 	offset += sizeof(elf);				/* Elf header */
+ 	offset += (segs+1) * sizeof(struct elf_phdr);	/* Program headers */
+ 
+ 	/*
+ 	 * Set up the notes in similar form to SVR4 core dumps made
+ 	 * with info from their /proc.
+ 	 */
+ 	memset(&psinfo, 0, sizeof(psinfo));
+ 	memset(&prstatus, 0, sizeof(prstatus));
+ 
+ 	notes[0].name = "CORE";
+ 	notes[0].type = NT_PRSTATUS;
+ 	notes[0].datasz = sizeof(prstatus);
+ 	notes[0].data = &prstatus;
+ 	prstatus.pr_info.si_signo = prstatus.pr_cursig = signr;
+ 	prstatus.pr_sigpend = current->signal;
+ 	prstatus.pr_sighold = current->blocked;
+ 	psinfo.pr_pid = prstatus.pr_pid = current->pid;
+ 	psinfo.pr_ppid = prstatus.pr_ppid = current->p_pptr->pid;
+ 	psinfo.pr_pgrp = prstatus.pr_pgrp = current->pgrp;
+ 	psinfo.pr_sid = prstatus.pr_sid = current->session;
+ 	prstatus.pr_utime.tv_sec = CT_TO_SECS(current->utime);
+ 	prstatus.pr_utime.tv_usec = CT_TO_USECS(current->utime);
+ 	prstatus.pr_stime.tv_sec = CT_TO_SECS(current->stime);
+ 	prstatus.pr_stime.tv_usec = CT_TO_USECS(current->stime);
+ 	prstatus.pr_cutime.tv_sec = CT_TO_SECS(current->cutime);
+ 	prstatus.pr_cutime.tv_usec = CT_TO_USECS(current->cutime);
+ 	prstatus.pr_cstime.tv_sec = CT_TO_SECS(current->cstime);
+ 	prstatus.pr_cstime.tv_usec = CT_TO_USECS(current->cstime);
+ 	if (sizeof(elf_gregset_t) != sizeof(struct pt_regs))
+ 	{
+ 		printk("sizeof(elf_gregset_t) (%d) != sizeof(struct pt_regs) (%d)\n",
+ 			sizeof(elf_gregset_t), sizeof(struct pt_regs));
+ 	}
+ 	else
+ 		*(struct pt_regs *)&prstatus.pr_reg = *regs;
+ 	
+ #ifdef DEBUG
+ 	dump_regs("Passed in regs", (elf_greg_t *)regs);
+ 	dump_regs("prstatus regs", (elf_greg_t *)&prstatus.pr_reg);
+ #endif
+ 
+ 	notes[1].name = "CORE";
+ 	notes[1].type = NT_PRPSINFO;
+ 	notes[1].datasz = sizeof(psinfo);
+ 	notes[1].data = &psinfo;
+ 	psinfo.pr_state = current->state;
+ 	psinfo.pr_sname = (current->state < 0 || current->state > 5) ? '.' : "RSDZTD"[current->state];
+ 	psinfo.pr_zomb = psinfo.pr_sname == 'Z';
+ 	psinfo.pr_nice = current->priority-15;
+ 	psinfo.pr_flag = current->flags;
+ 	psinfo.pr_uid = current->uid;
+ 	psinfo.pr_gid = current->gid;
+ 	{
+ 		int i, len;
+ 
+ 		set_fs(fs);
+ 		
+ 		len = current->mm->arg_end - current->mm->arg_start;
+ 		len = len >= ELF_PRARGSZ ? ELF_PRARGSZ : len;
+ 		memcpy_fromfs(&psinfo.pr_psargs,
+ 			      (const char *)current->mm->arg_start, len);
+ 		for(i = 0; i < len; i++)
+ 			if (psinfo.pr_psargs[i] == 0)
+ 				psinfo.pr_psargs[i] = ' ';
+ 		psinfo.pr_psargs[len] = 0;
+ 
+ 		set_fs(KERNEL_DS);
+ 	}
+ 	strncpy(psinfo.pr_fname, current->comm, sizeof(psinfo.pr_fname));
+ 
+ 	notes[2].name = "CORE";
+ 	notes[2].type = NT_TASKSTRUCT;
+ 	notes[2].datasz = sizeof(*current);
+ 	notes[2].data = current;
+ 	
+ 	/* Try to dump the fpu. */
+ 	prstatus.pr_fpvalid = dump_fpu (&fpu);
+ 	if (!prstatus.pr_fpvalid)
+ 	{
+ 		numnote--;
+ 	}
+ 	else
+ 	{
+ 		notes[3].name = "CORE";
+ 		notes[3].type = NT_PRFPREG;
+ 		notes[3].datasz = sizeof(fpu);
+ 		notes[3].data = &fpu;
+ 	}
+ 	
+ 	/* Write notes phdr entry */
+ 	{
+ 		struct elf_phdr phdr;
+ 		int sz = 0;
+ 
+ 		for(i = 0; i < numnote; i++)
+ 			sz += notesize(&notes[i]);
+ 		
+ 		phdr.p_type = PT_NOTE;
+ 		phdr.p_offset = offset;
+ 		phdr.p_vaddr = 0;
+ 		phdr.p_paddr = 0;
+ 		phdr.p_filesz = sz;
+ 		phdr.p_memsz = 0;
+ 		phdr.p_flags = 0;
+ 		phdr.p_align = 0;
+ 
+ 		offset += phdr.p_filesz;
+ 		DUMP_WRITE(&phdr, sizeof(phdr));
+ 	}
+ 
+ 	/* Page-align dumped data */
+ 	dataoff = offset = roundup(offset, PAGE_SIZE);
+ 	
+ 	/* Write program headers for segments dump */
+ 	for(vma = current->mm->mmap, i = 0;
+ 		i < segs && vma != NULL; vma = vma->vm_next) {
+ 		struct elf_phdr phdr;
+ 		size_t sz;
+ 
+ 		if (!maydump(vma))
+ 			continue;
+ 		i++;
+ 
+ 		sz = vma->vm_end - vma->vm_start;
+ 		
+ 		phdr.p_type = PT_LOAD;
+ 		phdr.p_offset = offset;
+ 		phdr.p_vaddr = vma->vm_start;
+ 		phdr.p_paddr = 0;
+ 		phdr.p_filesz = sz;
+ 		phdr.p_memsz = sz;
+ 		offset += sz;
+ 		phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
+ 		if (vma->vm_flags & VM_WRITE) phdr.p_flags |= PF_W;
+ 		if (vma->vm_flags & VM_EXEC) phdr.p_flags |= PF_X;
+ 		phdr.p_align = PAGE_SIZE;
+ 
+ 		DUMP_WRITE(&phdr, sizeof(phdr));
+ 	}
+ 
+ 	for(i = 0; i < numnote; i++)
+ 		if (!writenote(&notes[i], &file))
+ 			goto close_coredump;
+ 	
+ 	set_fs(fs);
+ 
+ 	DUMP_SEEK(dataoff);
+ 	
+ 	for(i = 0, vma = current->mm->mmap;
+ 	    i < segs && vma != NULL;
+ 	    vma = vma->vm_next) {
+ 		unsigned long addr = vma->vm_start;
+ 		unsigned long len = vma->vm_end - vma->vm_start;
+ 		
+ 		if (!maydump(vma))
+ 			continue;
+ 		i++;
+ #ifdef DEBUG
+ 		printk("elf_core_dump: writing %08lx %lx\n", addr, len);
+ #endif
+ 		DUMP_WRITE((void *)addr, len);
+ 	}
+ 
+ 	if (file.f_pos != offset) {
+ 		/* Sanity check */
+ 		printk("elf_core_dump: file.f_pos (%ld) != offset (%ld)\n",
+ 		       file.f_pos, offset);
+ 	}
+ 
+  close_coredump:
+ 	if (file.f_op->release)
+ 		file.f_op->release(inode,&file);
+ 
+  end_coredump:
+ 	set_fs(fs);
+ 	iput(inode);
+ #ifndef CONFIG_BINFMT_ELF
+ 	MOD_DEC_USE_COUNT;
+ #endif
+ 	return has_dumped;
+ }
+ 
  #ifdef MODULE
  char kernel_version[] = UTS_RELEASE;
  
***************
*** 753,758 ****
--- 1162,1168 ----
  	return 0;
  }
  
+ 
  void cleanup_module( void) {
  	
  	if (MOD_IN_USE)
diff -c -r linux//fs/hpfs/hpfs_fs.c linux_patched//fs/hpfs/hpfs_fs.c
*** linux//fs/hpfs/hpfs_fs.c	Wed Jul 26 06:43:32 1995
--- linux_patched//fs/hpfs/hpfs_fs.c	Tue Feb  6 21:42:21 1996
***************
*** 394,400 ****
  	    || memcmp(&bootblock->sig_hpfs, "HPFS    ", 8)
  	    || little_ushort(bootblock->bytes_per_sector) != 512) {
  		printk("HPFS: hpfs_read_super: Not HPFS\n");
! 		goto bail2;
  	}
  
  	/*
--- 394,400 ----
  	    || memcmp(&bootblock->sig_hpfs, "HPFS    ", 8)
  	    || little_ushort(bootblock->bytes_per_sector) != 512) {
  		printk("HPFS: hpfs_read_super: Not HPFS\n");
! 	       goto bail2; 
  	}
  
  	/*
***************
*** 413,419 ****
  	 * Above errors mean we could get wrong answers if we proceed,
  	 * so don't
  	 */
- 
  	if (dubious)
  		goto bail2;
  
--- 413,418 ----
Only in linux_patched//include: asm
diff -c -r linux//include/asm-i386/io.h linux_patched//include/asm-i386/io.h
*** linux//include/asm-i386/io.h	Mon Aug 15 07:56:19 1994
--- linux_patched//include/asm-i386/io.h	Wed Feb  7 18:46:08 1996
***************
*** 49,57 ****
  
  #define __OUT(s,s1,x) \
  __OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); } \
! __OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "i" (port)); } \
  __OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); SLOW_DOWN_IO; } \
! __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "i" (port)); SLOW_DOWN_IO; }
  
  #define __IN1(s) \
  extern inline unsigned int __in##s(unsigned short port) { unsigned int _v;
--- 49,57 ----
  
  #define __OUT(s,s1,x) \
  __OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); } \
! __OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); } \
  __OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); SLOW_DOWN_IO; } \
! __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; }
  
  #define __IN1(s) \
  extern inline unsigned int __in##s(unsigned short port) { unsigned int _v;
***************
*** 61,69 ****
  
  #define __IN(s,s1,i...) \
  __IN1(s) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); return _v; } \
! __IN1(s##c) __IN2(s,s1,"") : "=a" (_v) : "i" (port) ,##i ); return _v; } \
  __IN1(s##_p) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); SLOW_DOWN_IO; return _v; } \
! __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "i" (port) ,##i ); SLOW_DOWN_IO; return _v; }
  
  #define __INS(s) \
  extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \
--- 61,69 ----
  
  #define __IN(s,s1,i...) \
  __IN1(s) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); return _v; } \
! __IN1(s##c) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); return _v; } \
  __IN1(s##_p) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); SLOW_DOWN_IO; return _v; } \
! __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; }
  
  #define __INS(s) \
  extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \
diff -c -r linux//include/asm-i386/irq.h linux_patched//include/asm-i386/irq.h
*** linux//include/asm-i386/irq.h	Sun Nov 27 18:19:54 1994
--- linux_patched//include/asm-i386/irq.h	Sun Aug 27 18:18:31 1995
***************
*** 79,86 ****
  	"inb $0x21,%al\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
! 	"1:\torb $" #mask ",_cache_21\n\t" \
! 	"movb _cache_21,%al\n\t" \
  	"outb %al,$0x21\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
--- 79,86 ----
  	"inb $0x21,%al\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
! 	"1:\torb $" #mask ","SYMBOL_NAME_STR(cache_21)"\n\t" \
! 	"movb "SYMBOL_NAME_STR(cache_21)",%al\n\t" \
  	"outb %al,$0x21\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
***************
*** 91,98 ****
  	"inb $0xA1,%al\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
! 	"1:\torb $" #mask ",_cache_A1\n\t" \
! 	"movb _cache_A1,%al\n\t" \
  	"outb %al,$0xA1\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
--- 91,98 ----
  	"inb $0xA1,%al\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
! 	"1:\torb $" #mask ","SYMBOL_NAME_STR(cache_A1)"\n\t" \
! 	"movb "SYMBOL_NAME_STR(cache_A1)",%al\n\t" \
  	"outb %al,$0xA1\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
***************
*** 106,121 ****
  	"inb $0x21,%al\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
! 	"1:\tandb $~(" #mask "),_cache_21\n\t" \
! 	"movb _cache_21,%al\n\t" \
  	"outb %al,$0x21\n\t"
  
  #define UNBLK_SECOND(mask) \
  	"inb $0xA1,%al\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
! 	"1:\tandb $~(" #mask "),_cache_A1\n\t" \
! 	"movb _cache_A1,%al\n\t" \
  	"outb %al,$0xA1\n\t"
  
  #define IRQ_NAME2(nr) nr##_interrupt(void)
--- 106,121 ----
  	"inb $0x21,%al\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
! 	"1:\tandb $~(" #mask "),"SYMBOL_NAME_STR(cache_21)"\n\t" \
! 	"movb "SYMBOL_NAME_STR(cache_21)",%al\n\t" \
  	"outb %al,$0x21\n\t"
  
  #define UNBLK_SECOND(mask) \
  	"inb $0xA1,%al\n\t" \
  	"jmp 1f\n" \
  	"1:\tjmp 1f\n" \
! 	"1:\tandb $~(" #mask "),"SYMBOL_NAME_STR(cache_A1)"\n\t" \
! 	"movb "SYMBOL_NAME_STR(cache_A1)",%al\n\t" \
  	"outb %al,$0xA1\n\t"
  
  #define IRQ_NAME2(nr) nr##_interrupt(void)
***************
*** 128,163 ****
  asmlinkage void FAST_IRQ_NAME(nr); \
  asmlinkage void BAD_IRQ_NAME(nr); \
  __asm__( \
! "\n.align 4\n" \
! "_IRQ" #nr "_interrupt:\n\t" \
  	"pushl $-"#nr"-2\n\t" \
  	SAVE_ALL \
  	ACK_##chip(mask) \
! 	"incl _intr_count\n\t"\
  	"sti\n\t" \
  	"movl %esp,%ebx\n\t" \
  	"pushl %ebx\n\t" \
  	"pushl $" #nr "\n\t" \
! 	"call _do_IRQ\n\t" \
  	"addl $8,%esp\n\t" \
  	"cli\n\t" \
  	UNBLK_##chip(mask) \
! 	"decl _intr_count\n\t" \
  	"jmp ret_from_sys_call\n" \
! "\n.align 4\n" \
! "_fast_IRQ" #nr "_interrupt:\n\t" \
  	SAVE_MOST \
  	ACK_##chip(mask) \
! 	"incl _intr_count\n\t" \
  	"pushl $" #nr "\n\t" \
! 	"call _do_fast_IRQ\n\t" \
  	"addl $4,%esp\n\t" \
  	"cli\n\t" \
  	UNBLK_##chip(mask) \
! 	"decl _intr_count\n\t" \
  	RESTORE_MOST \
! "\n\n.align 4\n" \
! "_bad_IRQ" #nr "_interrupt:\n\t" \
  	SAVE_MOST \
  	ACK_##chip(mask) \
  	RESTORE_MOST);
--- 128,163 ----
  asmlinkage void FAST_IRQ_NAME(nr); \
  asmlinkage void BAD_IRQ_NAME(nr); \
  __asm__( \
! "\n"ALIGN_STR"\n" \
! SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \
  	"pushl $-"#nr"-2\n\t" \
  	SAVE_ALL \
  	ACK_##chip(mask) \
! 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
  	"sti\n\t" \
  	"movl %esp,%ebx\n\t" \
  	"pushl %ebx\n\t" \
  	"pushl $" #nr "\n\t" \
! 	"call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \
  	"addl $8,%esp\n\t" \
  	"cli\n\t" \
  	UNBLK_##chip(mask) \
! 	"decl "SYMBOL_NAME_STR(intr_count)"\n\t" \
  	"jmp ret_from_sys_call\n" \
! "\n"ALIGN_STR"\n" \
! SYMBOL_NAME_STR(fast_IRQ) #nr "_interrupt:\n\t" \
  	SAVE_MOST \
  	ACK_##chip(mask) \
! 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t" \
  	"pushl $" #nr "\n\t" \
! 	"call "SYMBOL_NAME_STR(do_fast_IRQ)"\n\t" \
  	"addl $4,%esp\n\t" \
  	"cli\n\t" \
  	UNBLK_##chip(mask) \
! 	"decl "SYMBOL_NAME_STR(intr_count)"\n\t" \
  	RESTORE_MOST \
! "\n"ALIGN_STR"\n" \
! SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \
  	SAVE_MOST \
  	ACK_##chip(mask) \
  	RESTORE_MOST);
diff -c -r linux//include/asm-i386/system.h linux_patched//include/asm-i386/system.h
*** linux//include/asm-i386/system.h	Tue Feb 14 06:39:06 1995
--- linux_patched//include/asm-i386/system.h	Sun Aug 27 18:18:31 1995
***************
*** 49,58 ****
   */
  #define switch_to(tsk) do { \
  __asm__("cli\n\t" \
! 	"xchgl %%ecx,_current\n\t" \
  	"ljmp %0\n\t" \
  	"sti\n\t" \
! 	"cmpl %%ecx,_last_task_used_math\n\t" \
  	"jne 1f\n\t" \
  	"clts\n" \
  	"1:" \
--- 49,58 ----
   */
  #define switch_to(tsk) do { \
  __asm__("cli\n\t" \
! 	"xchgl %%ecx,"SYMBOL_NAME_STR(current)"\n\t" \
  	"ljmp %0\n\t" \
  	"sti\n\t" \
! 	"cmpl %%ecx,"SYMBOL_NAME_STR(last_task_used_math)"\n\t" \
  	"jne 1f\n\t" \
  	"clts\n" \
  	"1:" \
Only in linux_patched//include/linux: autoconf.h
Only in linux_patched//include/linux: elfcore.h
diff -c -r linux//include/linux/linkage.h linux_patched//include/linux/linkage.h
*** linux//include/linux/linkage.h	Wed Dec  1 12:44:15 1993
--- linux_patched//include/linux/linkage.h	Sun Aug 27 18:18:40 1995
***************
*** 7,10 ****
--- 7,52 ----
  #define asmlinkage
  #endif
  
+ #if !defined(__i486__) && !defined(__i586__)
+ #ifdef __ELF__
+ #define ALIGN .align 4,0x90
+ #define ALIGN_STR ".align 4,0x90"
+ #else  /* __ELF__ */
+ #define ALIGN .align 2,0x90
+ #define ALIGN_STR ".align 2,0x90"
+ #endif /* __ELF__ */
+ #else  /* __i486__/__i586__ */
+ #ifdef __ELF__
+ #define ALIGN .align 16,0x90
+ #define ALIGN_STR ".align 16,0x90"
+ #else  /* __ELF__ */
+ #define ALIGN .align 4,0x90
+ #define ALIGN_STR ".align 4,0x90"
+ #endif /* __ELF__ */
+ #endif /* __i486__/__i586__ */
+ 
+ #ifdef __ELF__
+ #define SYMBOL_NAME_STR(X) #X
+ #define SYMBOL_NAME(X) X
+ #ifdef __STDC__
+ #define SYMBOL_NAME_LABEL(X) X##:
+ #else
+ #define SYMBOL_NAME_LABEL(X) X/**/:
  #endif
+ #else
+ #define SYMBOL_NAME_STR(X) "_"#X
+ #ifdef __STDC__
+ #define SYMBOL_NAME(X) _##X
+ #define SYMBOL_NAME_LABEL(X) _##X##:
+ #else
+ #define SYMBOL_NAME(X) _/**/X
+ #define SYMBOL_NAME_LABEL(X) _/**/X/**/:
+ #endif
+ #endif
+ 
+ #define ENTRY(name) \
+   .globl SYMBOL_NAME(name); \
+   ALIGN; \
+   SYMBOL_NAME_LABEL(name)
+ 
+ #endif
diff -c -r linux//include/linux/mcd.h linux_patched//include/linux/mcd.h
*** linux//include/linux/mcd.h	Thu Jul  7 18:26:55 1994
--- linux_patched//include/linux/mcd.h	Wed Jan 31 00:53:14 1996
***************
*** 22,31 ****
   */
  
  /* *** change this to set the I/O port address */
! #define MCD_BASE_ADDR	        0x300
  
  /* *** change this to set the interrupt number */
! #define MCD_INTR_NR		10
  
  /* Increase this if you get lots of timeouts */
  #define MCD_STATUS_DELAY	200
--- 22,31 ----
   */
  
  /* *** change this to set the I/O port address */
! #define MCD_BASE_ADDR	        0x310
  
  /* *** change this to set the interrupt number */
! #define MCD_INTR_NR		11
  
  /* Increase this if you get lots of timeouts */
  #define MCD_STATUS_DELAY	200
diff -c -r linux//include/linux/symtab_begin.h linux_patched//include/linux/symtab_begin.h
*** linux//include/linux/symtab_begin.h	Mon Jan 23 08:38:30 1995
--- linux_patched//include/linux/symtab_begin.h	Sun Aug 27 18:18:42 1995
***************
*** 1,16 ****
  #ifdef CONFIG_MODVERSIONS /* CONFIG_MODVERSIONS */
  #undef _set_ver
  #undef X
  #ifndef __GENKSYMS__
  #ifdef MODULE
! #define _set_ver(sym,ver) { (void *) & sym ## _R ## ver, "_" #sym "_R" #ver }
  #else /* MODULE */
! #define _set_ver(sym,ver) { (void *) & sym, "_" #sym "_R" #ver }
  #endif /* MODULE */
  #define X(a) a
  #endif /* __GENKSYMS__ */
  #else /* CONFIG_MODVERSIONS */
! #define X(sym) { (void *) & sym, "_" #sym }
  #endif /* CONFIG_MODVERSIONS */
  #define EMPTY {0,0}
  	0, 0, 0, {
--- 1,19 ----
+ #include <linux/linkage.h>
  #ifdef CONFIG_MODVERSIONS /* CONFIG_MODVERSIONS */
  #undef _set_ver
  #undef X
  #ifndef __GENKSYMS__
  #ifdef MODULE
! #define _set_ver(sym,ver) \
! 	{ (void *) & sym ## _R ## ver, SYMBOL_NAME_STR(sym) "_R" #ver }
  #else /* MODULE */
! #define _set_ver(sym,ver) \
! 	{ (void *) & sym, SYMBOL_NAME_STR(sym) "_R" #ver }
  #endif /* MODULE */
  #define X(a) a
  #endif /* __GENKSYMS__ */
  #else /* CONFIG_MODVERSIONS */
! #define X(sym) { (void *) & sym, SYMBOL_NAME_STR(sym)}
  #endif /* CONFIG_MODVERSIONS */
  #define EMPTY {0,0}
  	0, 0, 0, {
diff -c -r linux//include/linux/sys.h linux_patched//include/linux/sys.h
*** linux//include/linux/sys.h	Wed Feb 22 10:27:52 1995
--- linux_patched//include/linux/sys.h	Sun Aug 27 18:18:43 1995
***************
*** 27,32 ****
--- 27,36 ----
   * These are system calls that haven't been implemented yet
   * but have an entry in the table for future expansion..
   */
+ #ifdef __ELF__
+ #define sys_quotactl	sys_ni_syscall
+ #else
  #define _sys_quotactl	_sys_ni_syscall
+ #endif
  
  #endif
diff -c -r linux//include/linux/timex.h linux_patched//include/linux/timex.h
*** linux//include/linux/timex.h	Tue Aug  9 06:35:37 1994
--- linux_patched//include/linux/timex.h	Sun Aug 27 18:18:43 1995
***************
*** 88,93 ****
--- 88,106 ----
  				 */
  	struct timeval time;	/* (read only) */
  	long tick;		/* (modified) usecs between clock ticks */
+ 
+         long ppsfreq;           /* pps frequency (scaled ppm) (ro) */
+         long jitter;            /* pps jitter (us) (ro) */
+         int shift;              /* interval duration (s) (shift) (ro) */
+         long stabil;            /* pps stability (scaled ppm) (ro) */
+         long jitcnt;            /* jitter limit exceeded (ro) */
+         long calcnt;            /* calibration intervals (ro) */
+         long errcnt;            /* calibration errors (ro) */
+         long stbcnt;            /* stability limit exceeded (ro) */
+ 
+ 	int  :32; int  :32; int  :32; int  :32;
+ 	int  :32; int  :32; int  :32; int  :32;
+ 	int  :32; int  :32; int  :32; int  :32;
  };
  
  /*
Only in linux_patched//include/linux: version.h
diff -c -r linux//kernel/ksyms.c linux_patched//kernel/ksyms.c
*** linux//kernel/ksyms.c	Sun Jul 16 19:21:35 1995
--- linux_patched//kernel/ksyms.c	Tue Feb  6 22:37:34 1996
***************
*** 75,87 ****
  extern int request_dma(unsigned int dmanr, char * deviceID);
  extern void free_dma(unsigned int dmanr);
  
  extern int close_fp(struct file *filp);
  extern void (* iABI_hook)(struct pt_regs * regs);
  
  struct symbol_table symbol_table = {
  #include <linux/symtab_begin.h>
  #ifdef CONFIG_MODVERSIONS
! 	{ (void *)1 /* Version version :-) */, "_Using_Versions" },
  #endif
  	/* stackable module support */
  	X(rename_module_symbol),
--- 75,92 ----
  extern int request_dma(unsigned int dmanr, char * deviceID);
  extern void free_dma(unsigned int dmanr);
  
+ extern void   (*kd_nosound)(unsigned long ignored);
+ extern void   (*kd_mksound)(unsigned int count, unsigned int ticks);
+ 
  extern int close_fp(struct file *filp);
  extern void (* iABI_hook)(struct pt_regs * regs);
  
  struct symbol_table symbol_table = {
  #include <linux/symtab_begin.h>
  #ifdef CONFIG_MODVERSIONS
! 
! 	{ (void *)1 /* Version version :-) */,
! 		SYMBOL_NAME_STR (Using_Versions) },
  #endif
  	/* stackable module support */
  	X(rename_module_symbol),
***************
*** 255,260 ****
--- 260,267 ----
  	X(simple_strtoul),
  	X(system_utsname),
  	X(sys_call_table),
+ 	X(kd_nosound),
+ 	X(kd_mksound),
  
  	/* Signal interfaces */
  	X(do_signal),

