svn commit: r238225 - projects/arm_eabi/sys/arm/arm
Andrew Turner
andrew at FreeBSD.org
Sun Jul 8 09:55:01 UTC 2012
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)
More information about the svn-src-projects
mailing list