yann@1: I haven't built glibc-2.3.2 for arm myself, but yann@1: http://sources.redhat.com/ml/bug-glibc/2003-05/msg00076.html and yann@1: http://www.linux.org.uk/pipermail/linux-arm/2003-November/006560.html yann@1: give me the distinct impression that you need the latest sysdep-cancel.h from yann@1: cvs. yann@1: yann@1: Retrieved with yann@1: yann@1: 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 yann@1: yann@1: =================================================================== yann@1: RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h,v yann@1: retrieving revision 1.2 yann@1: retrieving revision 1.6 yann@1: diff -u -r1.2 -r1.6 yann@1: --- libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h 2003/01/12 09:14:25 1.2 yann@1: +++ libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h 2003/06/06 17:31:40 1.6 yann@1: @@ -24,6 +24,17 @@ yann@1: yann@1: #if !defined NOT_IN_libc || defined IS_IN_libpthread yann@1: yann@1: +/* We push lr onto the stack, so we have to use ldmib instead of ldmia yann@1: + to find the saved arguments. */ yann@1: +# ifdef PIC yann@1: +# undef DOARGS_5 yann@1: +# undef DOARGS_6 yann@1: +# undef DOARGS_7 yann@1: +# define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8]; yann@1: +# define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5}; yann@1: +# define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6}; yann@1: +# endif yann@1: + yann@1: # undef PSEUDO_RET yann@1: # define PSEUDO_RET \ yann@1: ldrcc pc, [sp], $4; \ yann@1: @@ -34,7 +45,7 @@ yann@1: # define PSEUDO(name, syscall_name, args) \ yann@1: .section ".text"; \ yann@1: PSEUDO_PROLOGUE; \ yann@1: - ENTRY (name) \ yann@1: + ENTRY (name); \ yann@1: SINGLE_THREAD_P_INT; \ yann@1: bne .Lpseudo_cancel; \ yann@1: DO_CALL (syscall_name, args); \ yann@1: @@ -110,7 +121,7 @@ yann@1: ldr reg, 2b; \ yann@1: 3: \ yann@1: add ip, pc, ip; \ yann@1: - ldr ip, [ip, lr]; \ yann@1: + ldr ip, [ip, reg]; \ yann@1: teq ip, #0; yann@1: # define SINGLE_THREAD_P_INT \ yann@1: str lr, [sp, $-4]!; \