-
Notifications
You must be signed in to change notification settings - Fork 18.1k
runtime: give better diagnostic when it should be compiled with GOARM=5 #3381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
Comment 1 by [email protected]: Note this is compiled with GOARM=5. All fine on my other ARM machine that is a more recent architecture. |
Comment 3 by [email protected]: I commented out both syscalls: // 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 MOVW $0, R2 // old_sa MOVW $8, R3 // c MOVW $174, R7 // sys_sigaction //BL oabi_syscall<>(SB) ADD $16, R13 // do an EABI syscall MOVW $20, R7 // sys_getpid //SWI $0 // this will trigger SIGILL on OABI systems B _rt0_arm(SB) In terms of compiling with GOARM=5, I thought this was a build time setting not for each compilation? Or have I got this wrong? I can't build for this system without that set, as it is an old ARM. If it is a compile time setting then possibly it was not set, can re-check. |
Comment 4 by [email protected]: Scratch this, I did a clean build from baeb068aac25 tip and did not have this issue. Assume something was broken with the build with respect to GOARM setting or similar. Suspicious as the tests did run ok, but my program did not, suspect was using the wrong compiler? |
We do have a few issues about SIGILL on ARMv5 hardware, like issue #2261 and issue #3331, but I think the OABI tests is OK (although SIGILL happens before proper SIGILL handler is registered will display the OABI warning, which is wrong, and I will fix it). Owner changed to @minux. Status changed to Accepted. |
runtime.check() uses floating point instructions, so on a FPU-less machine that can't emulate these instruction it will trigger SIGILL before runtime could setup signal handers properly, and the binary will display "This program can only be run on EABI kernels", which is misleading. I must admit, even if this issue is fixed, the message produced for this situation (Illegal instruction) isn't very helpful either (but at least not misleading, and we can tell people if that occurs, you should relink with GOARM=5). We still need to address the FPA instruction issue. Status changed to Accepted. |
Comment 10 by [email protected]: Ah that makes sense. I don't know my ARM assembly well enough yet. Personally I would have been very happy with a SIGILL. The EABI result was so confusing as as far as I know nothing uses the old ABI, so that simply wasnt the problem. I guess if you were very nice you could set up a SIGILL handler at the beginning of any non GOARM=5 executable and then run a bunch of instructions that are not supported on old architectures, and report a helpful error, then carry on to the existing test... |
Or better, get rid of remaining FPA instructions, so that the kernel could emulate them for us. (issue #3456) |
Issue #3911 has been merged into this issue. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by [email protected]:
The text was updated successfully, but these errors were encountered: