Make alpha actually work.

diff --git a/klibc/README b/klibc/README
index 2d79bc5..7ba0ae9 100644
--- a/klibc/README
+++ b/klibc/README
@@ -34,7 +34,7 @@
 
    The following is the last known status of various architectures:
 
-   alpha:	 Untested
+   alpha:	 Working static, shared untested
    arm-thumb:	 Probably working
    arm26:	 Not yet ported
    arm:		 Working
diff --git a/klibc/arch/alpha/Makefile.inc b/klibc/arch/alpha/Makefile.inc
index 89f5ecb..62fce9d 100644
--- a/klibc/arch/alpha/Makefile.inc
+++ b/klibc/arch/alpha/Makefile.inc
@@ -11,7 +11,7 @@
 DIVCFLAGS = $(REQFLAGS) \
 	-O3 -fomit-frame-pointer -fcall-saved-1 -fcall-saved-2 \
 	-fcall-saved-3 -fcall-saved-4 -fcall-saved-5 -fcall-saved-6 \
-	-fcall-saved-7 -fcall-saved-8 -fcall-saved-15 -fcall-saved-16 \
+	-fcall-saved-7 -fcall-saved-8 -ffixed-15 -fcall-saved-16 \
 	-fcall-saved-17 -fcall-saved-18 -fcall-saved-19 -fcall-saved-20 \
 	-fcall-saved-21 -fcall-saved-22 -ffixed-23 -fcall-saved-24 \
 	-ffixed-25 -ffixed-27
@@ -28,7 +28,7 @@
 	arch/$(ARCH)/pipe.o \
 	arch/$(ARCH)/setjmp.o \
 	arch/$(ARCH)/syscall.o \
-	arch/$(ARCH)/sysdual.o \
+	arch/$(ARCH)/sysdual.o
 
 ARCHSOOBJS = $(patsubst %.o,%.lo,$(ARCHOBJS))
 
diff --git a/klibc/arch/alpha/crt0.S b/klibc/arch/alpha/crt0.S
index 6c29581..79f4334 100644
--- a/klibc/arch/alpha/crt0.S
+++ b/klibc/arch/alpha/crt0.S
@@ -3,10 +3,10 @@
 #
 
 	.text
-	.type	__start,@function
-	.ent	__start, 0
-	.globl	__start
-__start:
+	.type	_start,@function
+	.ent	_start, 0
+	.globl	_start
+_start:
 	.frame  $30, 0, $26, 0
 	mov	$31, $15
 	br	$29, 1f
@@ -18,4 +18,4 @@
 	
 	jsr	$26, __libc_init
 	
-	.size __start,.-__start
+	.size	_start,.-_start
diff --git a/klibc/arch/alpha/setjmp.S b/klibc/arch/alpha/setjmp.S
index e1ad642..5d915f2 100644
--- a/klibc/arch/alpha/setjmp.S
+++ b/klibc/arch/alpha/setjmp.S
@@ -31,14 +31,14 @@
 	stq	ra,  56(a0)
 	stq	gp,  64(a0)
 	stq	sp,  72(a0)
-	stt	f2,  80(a0)
-	stt	f3,  88(a0)
-	stt	f4,  96(a0)
-	stt	f5, 104(a0)
-	stt	f6, 112(a0)
-	stt	f7, 120(a0)
-	stt	f8, 128(a0)
-	stt	f9, 136(a0)
+	stt	$f2,  80(a0)
+	stt	$f3,  88(a0)
+	stt	$f4,  96(a0)
+	stt	$f5, 104(a0)
+	stt	$f6, 112(a0)
+	stt	$f7, 120(a0)
+	stt	$f8, 128(a0)
+	stt	$f9, 136(a0)
 	ret	zero,(ra),1
 
 	.size setjmp,.-setjmp
@@ -59,14 +59,14 @@
 	ldq	ra,  56(a0)
 	ldq	gp,  64(a0)
 	ldq	sp,  72(a0)
-	ldt	f2,  80(a0)
-	ldt	f3,  88(a0)
-	ldt	f4,  96(a0)
-	ldt	f5, 104(a0)
-	ldt	f6, 112(a0)
-	ldt	f7, 120(a0)
-	ldt	f8, 128(a0)
-	ldt	f9, 136(a0)
+	ldt	$f2,  80(a0)
+	ldt	$f3,  88(a0)
+	ldt	$f4,  96(a0)
+	ldt	$f5, 104(a0)
+	ldt	$f6, 112(a0)
+	ldt	$f7, 120(a0)
+	ldt	$f8, 128(a0)
+	ldt	$f9, 136(a0)
 	/* We're bound to get a mispredict here, but at least give us
 	   a chance to get the return stack back in sync... */
 	ret	zero,(ra),1
diff --git a/klibc/arch/alpha/syscall.S b/klibc/arch/alpha/syscall.S
index 95dcbed..0c87414 100644
--- a/klibc/arch/alpha/syscall.S
+++ b/klibc/arch/alpha/syscall.S
@@ -13,6 +13,9 @@
 	.frame	sp,0,ra,0
 	callsys
 	beq	a3, 1f
+	br	pv, 2f			# pv <- pc  
+2:
+	ldgp	gp, 0(pv)
 	lda	a1, errno
 	lda	v0, -1(zero)
 	stl	a3, 0(a1)
diff --git a/klibc/arch/alpha/sysdual.S b/klibc/arch/alpha/sysdual.S
index 4ffbf76..c00db88 100644
--- a/klibc/arch/alpha/sysdual.S
+++ b/klibc/arch/alpha/sysdual.S
@@ -20,6 +20,9 @@
 	callsys
 	mov	v0, a4
 	beq	a3, 1f
+	br	pv, 2f			# pv <- pc  
+2:
+	ldgp	gp, 0(pv)
 	lda	a1, errno
 	lda	v0, -1(zero)
 	stl	a3, 0(a1)
diff --git a/klibc/arch/alpha/sysstub.ph b/klibc/arch/alpha/sysstub.ph
index d1dc827..a24b6c0 100644
--- a/klibc/arch/alpha/sysstub.ph
+++ b/klibc/arch/alpha/sysstub.ph
@@ -12,10 +12,6 @@
 # A few system calls are dual-return with the second return value in
 # r20 (a4).
 
-# In order to find errno, we need the gp, which is computed from the
-# pv register.  This is two instructions, so the total length of the
-# stub is 4x4 = 16 bytes.
-
 sub make_sysstub($$$$@) {
     my($fname, $type, $sname, $stype, @args) = @_;
 
@@ -31,7 +27,6 @@
     print OUT "\t.ent\t${fname}, 0\n"; # What is this?
     print OUT "\t.globl ${fname}\n";
     print OUT "${fname}:\n";
-    print OUT "\tldgp\tgp,0(pv)\n";
     print OUT "\tlda\tv0, __NR_${sname}(zero)\n";
     print OUT "\tbr __syscall_${stype}\n";
     print OUT "\t.size\t${fname},.-${fname}\n";