Fix errno on Alpha

Daniel Jacobowitz drow@mvista.com
Wed Jan 8 15:30:00 GMT 2003


Right now, Alpha uses a !samegp optimized branch to call
__errno_location.  This tells the linker that we always want the copy
of __errno_location in this shared object; so syscalls never find the
copy in libpthread.so, and set the main thread's errno instead of the
current thread's errno.  Easily fixed, like so; please apply.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2003-01-08  Daniel Jacobowitz  <drow@mvista.com>

	* sysdeps/unix/alpha/sysdep.S (__syscall_error): Don't use
	!samegp to call __errno_location.

--- sysdeps/unix/alpha/sysdep.S	2002-12-23 10:47:40.000000000 -0500
+++ sysdeps/unix/alpha/sysdep.S	2003-01-07 23:04:21.000000000 -0500
@@ -68,11 +68,7 @@
 	PROLOGUE
 
 	/* Find our per-thread errno address  */
-#ifdef PIC
-	bsr	ra, __errno_location	!samegp
-#else
 	jsr	ra, __errno_location
-#endif
 
 	/* Store the error value.  */
 	ldq	t0, 8(sp)



More information about the Libc-alpha mailing list