patches/glibc/linuxthreads-2.3.2/sysdep-cancel-arm-1.2-1.6.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 I haven't built glibc-2.3.2 for arm myself, but
     2 http://sources.redhat.com/ml/bug-glibc/2003-05/msg00076.html and
     3 http://www.linux.org.uk/pipermail/linux-arm/2003-November/006560.html
     4 give me the distinct impression that you need the latest sysdep-cancel.h from
     5 cvs.
     6 
     7 Retrieved with
     8 
     9 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
    10 
    11 ===================================================================
    12 RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h,v
    13 retrieving revision 1.2
    14 retrieving revision 1.6
    15 diff -u -r1.2 -r1.6
    16 --- libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h	2003/01/12 09:14:25	1.2
    17 +++ libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h	2003/06/06 17:31:40	1.6
    18 @@ -24,6 +24,17 @@
    19  
    20  #if !defined NOT_IN_libc || defined IS_IN_libpthread
    21  
    22 +/* We push lr onto the stack, so we have to use ldmib instead of ldmia
    23 +   to find the saved arguments.  */
    24 +# ifdef PIC
    25 +#  undef DOARGS_5
    26 +#  undef DOARGS_6
    27 +#  undef DOARGS_7
    28 +#  define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8];
    29 +#  define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5};
    30 +#  define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6};
    31 +# endif
    32 +
    33  # undef PSEUDO_RET
    34  # define PSEUDO_RET						        \
    35      ldrcc pc, [sp], $4;						        \
    36 @@ -34,7 +45,7 @@
    37  # define PSEUDO(name, syscall_name, args)				\
    38    .section ".text";							\
    39      PSEUDO_PROLOGUE;							\
    40 -  ENTRY (name)								\
    41 +  ENTRY (name);								\
    42      SINGLE_THREAD_P_INT;						\
    43      bne .Lpseudo_cancel;						\
    44      DO_CALL (syscall_name, args);					\
    45 @@ -110,7 +121,7 @@
    46    ldr reg, 2b;								\
    47  3:									\
    48    add ip, pc, ip;							\
    49 -  ldr ip, [ip, lr];							\
    50 +  ldr ip, [ip, reg];							\
    51    teq ip, #0;
    52  #   define SINGLE_THREAD_P_INT						\
    53    str lr, [sp, $-4]!;							\