patches/glibc/linuxthreads-2.3.2/sysdep-cancel-arm-1.2-1.6.patch
changeset 1 eeea35fbf182
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/glibc/linuxthreads-2.3.2/sysdep-cancel-arm-1.2-1.6.patch	Sat Feb 24 11:00:05 2007 +0000
     1.3 @@ -0,0 +1,53 @@
     1.4 +I haven't built glibc-2.3.2 for arm myself, but
     1.5 +http://sources.redhat.com/ml/bug-glibc/2003-05/msg00076.html and
     1.6 +http://www.linux.org.uk/pipermail/linux-arm/2003-November/006560.html
     1.7 +give me the distinct impression that you need the latest sysdep-cancel.h from
     1.8 +cvs.
     1.9 +
    1.10 +Retrieved with
    1.11 +
    1.12 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h.diff?cvsroot=glibc&r1=text&tr1=1.2&r2=text&tr2=1.6&f=u
    1.13 +
    1.14 +===================================================================
    1.15 +RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h,v
    1.16 +retrieving revision 1.2
    1.17 +retrieving revision 1.6
    1.18 +diff -u -r1.2 -r1.6
    1.19 +--- libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h	2003/01/12 09:14:25	1.2
    1.20 ++++ libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h	2003/06/06 17:31:40	1.6
    1.21 +@@ -24,6 +24,17 @@
    1.22 + 
    1.23 + #if !defined NOT_IN_libc || defined IS_IN_libpthread
    1.24 + 
    1.25 ++/* We push lr onto the stack, so we have to use ldmib instead of ldmia
    1.26 ++   to find the saved arguments.  */
    1.27 ++# ifdef PIC
    1.28 ++#  undef DOARGS_5
    1.29 ++#  undef DOARGS_6
    1.30 ++#  undef DOARGS_7
    1.31 ++#  define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8];
    1.32 ++#  define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5};
    1.33 ++#  define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6};
    1.34 ++# endif
    1.35 ++
    1.36 + # undef PSEUDO_RET
    1.37 + # define PSEUDO_RET						        \
    1.38 +     ldrcc pc, [sp], $4;						        \
    1.39 +@@ -34,7 +45,7 @@
    1.40 + # define PSEUDO(name, syscall_name, args)				\
    1.41 +   .section ".text";							\
    1.42 +     PSEUDO_PROLOGUE;							\
    1.43 +-  ENTRY (name)								\
    1.44 ++  ENTRY (name);								\
    1.45 +     SINGLE_THREAD_P_INT;						\
    1.46 +     bne .Lpseudo_cancel;						\
    1.47 +     DO_CALL (syscall_name, args);					\
    1.48 +@@ -110,7 +121,7 @@
    1.49 +   ldr reg, 2b;								\
    1.50 + 3:									\
    1.51 +   add ip, pc, ip;							\
    1.52 +-  ldr ip, [ip, lr];							\
    1.53 ++  ldr ip, [ip, reg];							\
    1.54 +   teq ip, #0;
    1.55 + #   define SINGLE_THREAD_P_INT						\
    1.56 +   str lr, [sp, $-4]!;							\