aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2013-09-09 15:06:05 -0400
committerRuss Cox <rsc@golang.org>2013-09-09 15:06:05 -0400
commit6252b41981a5e5566b727de14cda5aece4bee98f (patch)
treee1b606c66a490f353202fd2676ae2dd7ab08b899 /src/pkg/runtime
parent9c21ce54dd3625aac3b948b509a9562b684434bc (diff)
downloadgo-6252b41981a5e5566b727de14cda5aece4bee98f.tar.xz
runtime: remove OABI check from ARM startup
The code in question is trying to print a nice error message when a Go EABI binary runs on an OABI machine. Unfortunately, the only way to do that is to use ARM Thumb instructions, which we otherwise don't use. There exist ARM EABI machines that do not support Thumb. We could run on them if not for this OABI check, so disable it. Fixes #5685. R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/13234050
Diffstat (limited to 'src/pkg/runtime')
-rw-r--r--src/pkg/runtime/rt0_linux_arm.s45
1 files changed, 25 insertions, 20 deletions
diff --git a/src/pkg/runtime/rt0_linux_arm.s b/src/pkg/runtime/rt0_linux_arm.s
index 63133e9ade..309fa2f79d 100644
--- a/src/pkg/runtime/rt0_linux_arm.s
+++ b/src/pkg/runtime/rt0_linux_arm.s
@@ -22,31 +22,36 @@ TEXT _rt0_arm_linux1(SB),NOSPLIT,$-4
// Save argc and argv
MOVM.DB.W [R0-R1], (R13)
- // set up sa_handler
- MOVW $bad_abi<>(SB), R0 // sa_handler
- MOVW $0, R1 // sa_flags
- MOVW $0, R2 // sa_restorer
- MOVW $0, R3 // sa_mask
- MOVM.DB.W [R0-R3], (R13)
- MOVW $4, R0 // SIGILL
- MOVW R13, R1 // sa
- SUB $16, R13
- MOVW R13, R2 // old_sa
- MOVW $8, R3 // c
- MOVW $174, R7 // sys_sigaction
- BL oabi_syscall<>(SB)
+
+ // Thumb mode OABI check disabled because there are some
+ // EABI systems that do not support Thumb execution.
+ // We can run on them except for this check!
+
+ // // set up sa_handler
+ // MOVW $bad_abi<>(SB), R0 // sa_handler
+ // MOVW $0, R1 // sa_flags
+ // MOVW $0, R2 // sa_restorer
+ // MOVW $0, R3 // sa_mask
+ // MOVM.DB.W [R0-R3], (R13)
+ // MOVW $4, R0 // SIGILL
+ // MOVW R13, R1 // sa
+ // SUB $16, R13
+ // MOVW R13, R2 // old_sa
+ // MOVW $8, R3 // c
+ // MOVW $174, R7 // sys_sigaction
+ // BL oabi_syscall<>(SB)
// do an EABI syscall
MOVW $20, R7 // sys_getpid
SWI $0 // this will trigger SIGILL on OABI systems
- MOVW $4, R0 // SIGILL
- MOVW R13, R1 // sa
- MOVW $0, R2 // old_sa
- MOVW $8, R3 // c
- MOVW $174, R7 // sys_sigaction
- SWI $0 // restore signal handler
- ADD $32, R13
+ // MOVW $4, R0 // SIGILL
+ // MOVW R13, R1 // sa
+ // MOVW $0, R2 // old_sa
+ // MOVW $8, R3 // c
+ // MOVW $174, R7 // sys_sigaction
+ // SWI $0 // restore signal handler
+ // ADD $32, R13
SUB $4, R13 // fake a stack frame for runtime·setup_auxv
BL runtime·setup_auxv(SB)