From 27b0258934adb212b760ead998d51f8005224abc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 3 May 2004 22:40:52 +0000 Subject: Update. 2004-04-23 Jakub Jelinek * sysdeps/ia64/fpu/libm_support.h (__libm_error_support): Add libc_hidden_proto. Define to __GI___libm_error_support for assembly going into libc.so. * sysdeps/ia64/fpu/libc_libm_error.c (__libm_error_support): Add libc_hidden_def. * include/libc-symbols.h (HIDDEN_BUILTIN_JUMPTARGET): Define. * sysdeps/ia64/bcopy.S (bcopy): Use it for jump to memmove. * sysdeps/unix/sysv/linux/ia64/sysdep.S (__syscall_error): Access gprel errno if RTLD_PRIVATE_ERRNO or __thread __libc_errno/errno if USE___THREAD. --- sysdeps/unix/sysv/linux/ia64/sysdep.S | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'sysdeps/unix/sysv') diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.S b/sysdeps/unix/sysv/linux/ia64/sysdep.S index c053c3a053..24780a1692 100644 --- a/sysdeps/unix/sysv/linux/ia64/sysdep.S +++ b/sysdeps/unix/sysv/linux/ia64/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang . @@ -19,9 +19,34 @@ #include #include +#include ENTRY(__syscall_error) -#ifdef _LIBC_REENTRANT +#if RTLD_PRIVATE_ERRNO + /* + * Note that the gp has to be set properly for this to work. + * As long as all syscalls are in the same load unit + * (executable or shared library) as this routine, we should + * be fine. Otherwise, we would have to first load the global + * pointer register from __gp. + */ + addl r2=@gprel(errno),gp + ;; + st4 [r2]=r8 + mov r8=-1 +#elif defined USE___THREAD +# ifndef NOT_IN_libc +# define SYSCALL_ERROR_ERRNO __libc_errno +# else +# define SYSCALL_ERROR_ERRNO errno +# endif + addl r2=@ltoff(@tprel(SYSCALL_ERROR_ERRNO)), gp;; + ld8 r2=[r2] + mov r3=r8;; + mov r8=-1 + add r2=r2,r13;; + st4 [r2]=r3 +#elif defined _LIBC_REENTRANT .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(0) alloc r33=ar.pfs, 0, 4, 0, 0 mov r32=rp -- cgit v1.2.3