| // Copyright 2009 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| TEXT _rt0_arm_linux(SB),NOSPLIT|NOFRAME,$0 |
| MOVW $_rt0_arm_linux1(SB), R4 |
| // When building with -buildmode=c-shared, this symbol is called when the shared |
| TEXT _rt0_arm_linux_lib(SB),NOSPLIT,$0 |
| TEXT _rt0_arm_linux1(SB),NOSPLIT|NOFRAME,$0 |
| // We first need to detect the kernel ABI, and warn the user |
| // if the system only supports OABI. |
| // The strategy here is to call some EABI syscall to see if |
| // If you get a SIGILL here, you have the wrong kernel. |
| // Save argc and argv (syscall will clobber at least R0). |
| MOVW $20, R7 // sys_getpid |
| SWI $0 // this will trigger SIGILL on OABI systems |