This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix errno on Alpha


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]