Date: Sun, 8 Jul 2012 09:55:00 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r238225 - projects/arm_eabi/sys/arm/arm Message-ID: <201207080955.q689t0xs042506@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Sun Jul 8 09:55:00 2012 New Revision: 238225 URL: http://svn.freebsd.org/changeset/base/238225 Log: Fix sigcode to work correctly with the new syscall interface. It should work with both the old and EABI version by setting r7 and placing the syscall value in the instruction. Modified: projects/arm_eabi/sys/arm/arm/locore.S Modified: projects/arm_eabi/sys/arm/arm/locore.S ============================================================================== --- projects/arm_eabi/sys/arm/arm/locore.S Sun Jul 8 09:49:01 2012 (r238224) +++ projects/arm_eabi/sys/arm/arm/locore.S Sun Jul 8 09:55:00 2012 (r238225) @@ -330,12 +330,29 @@ ENTRY_NP(abort) ENTRY_NP(sigcode) mov r0, sp + + /* + * Call the sigreturn system call. + * + * We have to load r7 manually rather than using + * "ldr r7, =SYS_sigreturn" to ensure the value of szsigcode is + * correct. Using the alternative places esigcode at the address + * of the datra rather than the address one past the data. + */ + + ldr r7, [pc, #12] /* Load SYS_sigreturn */ swi SYS_sigreturn /* Well if that failed we better exit quick ! */ + ldr r7, [pc, #8] /* Load SYS_exit */ swi SYS_exit - b . - 8 + + /* Branch back to retry SYS_sigreturn */ + b . - 16 + + .word SYS_sigreturn + .word SYS_exit .align 0 .global _C_LABEL(esigcode)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207080955.q689t0xs042506>