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

cmd/5a,5l: get illegal instruction error when running a cross-compiled go program on freescale i.mx28(armv5) #9795

Closed
tylerarnold opened this Issue Feb 6, 2015 · 12 comments

Comments

Projects
None yet
5 participants
@tylerarnold

tylerarnold commented Feb 6, 2015

on a ubuntu linux(3.16.2) machine, I downloaded go from source and built the cross-compilers according to:
http://dave.cheney.net/2013/07/09/an-introduction-to-cross-compilation-with-go-1-1

and built hello.go with GOARM=5, targeting the i.mx28 ( # cat /proc/cpuinfo
processor : 0
model name : ARM926EJ-S rev 5 (v5l)
Features : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant : 0x0
CPU part : 0x926
CPU revision : 5

Hardware : Freescale MXS (Device Tree)
Revision : 0000
Serial : 0000000000000000
)
running linux (3.16.2)

when I run the hello world binary on the target machine/i.mx, I get an "illegal instruction" error, and nothing in the kernel logs.

@bradfitz

This comment has been minimized.

Member

bradfitz commented Feb 6, 2015

Which version of Go?

/cc @minux @davecheney

@tylerarnold

This comment has been minimized.

tylerarnold commented Feb 6, 2015

I grabbed it today off https://code.google.com/p/go https://code.google.com/p/go

~/builds/go-stuff$ go version
go version devel +9ef10fde754f Thu Dec 11 16:32:25 2014 +1100 linux/amd64

On Feb 6, 2015, at 2:42 PM, Brad Fitzpatrick notifications@github.com wrote:

Which version of Go?

/cc @minux https://github.com/minux @davecheney https://github.com/davecheney

Reply to this email directly or view it on GitHub #9795 (comment).

@bradfitz

This comment has been minimized.

Member

bradfitz commented Feb 6, 2015

Go no longer lives there. You were reading an 18 month old blog post. See https://golang.org/doc/install/source

@bradfitz bradfitz closed this Feb 6, 2015

@tylerarnold

This comment has been minimized.

tylerarnold commented Feb 6, 2015

ahh..if only posts like that would be better updated to indicate they were out of date.
I’ll try with the latest thanks!

On Feb 6, 2015, at 2:48 PM, Brad Fitzpatrick notifications@github.com wrote:

Go no longer lives there. You were reading an 18 month old blog post. See https://golang.org/doc/install/source https://golang.org/doc/install/source

Reply to this email directly or view it on GitHub #9795 (comment).

@davecheney

This comment has been minimized.

Contributor

davecheney commented Feb 6, 2015

Blog posts get out of date, that is why I out ye version of Go that the
post was written for in the title.

Things have changed a bit and very time, I certainly couldn't have
predicted the move to GitHub back in 2013.

Please try with 1.4 and if you are still seeing he problem run the program
under gdb and disassemble the faulting instruction. It should be simple to
fix.

Dave
On 7 Feb 2015 09:50, "Tyler" notifications@github.com wrote:

ahh..if only posts like that would be better updated to indicate they were
out of date.
I’ll try with the latest thanks!

On Feb 6, 2015, at 2:48 PM, Brad Fitzpatrick notifications@github.com
wrote:

Go no longer lives there. You were reading an 18 month old blog post.
See https://golang.org/doc/install/source <
https://golang.org/doc/install/source>

Reply to this email directly or view it on GitHub <
https://github.com/golang/go/issues/9795#issuecomment-73309560>.


Reply to this email directly or view it on GitHub
#9795 (comment).

@tylerarnold

This comment has been minimized.

tylerarnold commented Feb 6, 2015

with version go1.4.1,
it still fails for me, in the runtime check code:
Reading symbols from /usr/bin/hello...done.
(gdb) r
Starting program: /usr/bin/hello

Program received signal SIGILL, Illegal instruction.
runtime.check ()
at /home/plumbuilder/builds/go-src/go/src/runtime/runtime.c:240
240 /home/plumbuilder/builds/go-src/go/src/runtime/runtime.c: No such file or directory.
(gdb) disassemble
Dump of assembler code for function runtime.check:
0x000430d4 <+0>: ldr r1, [r10, #12]
0x000430d8 <+4>: cmp sp, r1
0x000430dc <+8>: movls r3, lr
0x000430e0 <+12>: blls 0x47f54 <runtime.morestackc>
0x000430e4 <+16>: bls 0x430d4 <runtime.check>
0x000430e8 <+20>: str lr, [sp, #-104]! ; 0x68
0x000430ec <+24>: ldr r6, [pc, #672] ; 0x43394 <runtime.check+704>
0x000430f0 <+28>: ldr r5, [pc, #672] ; 0x43398 <runtime.check+708>
0x000430f4 <+32>: ldr r4, [pc, #672] ; 0x4339c <runtime.check+712>
0x000430f8 <+36>: str r6, [sp, #4]
0x000430fc <+40>: str r5, [sp, #8]
0x00043100 <+44>: str r4, [sp, #12]
0x00043104 <+48>: add r2, sp, #84 ; 0x54
0x00043108 <+52>: str r2, [sp, #16]
0x0004310c <+56>: bl 0x43594 <runtime.timediv>
0x00043110 <+60>: ldr r1, [sp, #20]
0x00043114 <+64>: ldr r11, [pc, #644] ; 0x433a0 <runtime.check+716>
0x00043118 <+68>: cmp r1, r11
0x0004311c <+72>: bne 0x43130 <runtime.check+92>
0x00043120 <+76>: ldr r1, [sp, #84] ; 0x54
0x00043124 <+80>: ldr r11, [pc, #632] ; 0x433a4 <runtime.check+720>
0x00043128 <+84>: cmp r1, r11
0x0004312c <+88>: beq 0x4313c <runtime.check+104>
0x00043130 <+92>: ldr r1, [pc, #624] ; 0x433a8 <runtime.check+724>
0x00043134 <+96>: str r1, [sp, #4]
0x00043138 <+100>: bl 0x20174 <runtime.throw>
0x0004313c <+104>: mov r1, #1
0x00043140 <+108>: str r1, [sp, #24]
0x00043144 <+112>: add r2, sp, #24
0x00043148 <+116>: str r2, [sp, #4]
0x0004314c <+120>: str r1, [sp, #8]
0x00043150 <+124>: mov r2, #2
0x00043154 <+128>: str r2, [sp, #12]
0x00043158 <+132>: bl 0x4bea4 <runtime.cas>
0x0004315c <+136>: ldrb r1, [sp, #16]
0x00043160 <+140>: cmp r1, #0
0x00043164 <+144>: ldreq r1, [pc, #576] ; 0x433ac <runtime.check+728>
0x00043168 <+148>: streq r1, [sp, #4]
0x0004316c <+152>: bleq 0x20174 <runtime.throw>
0x00043170 <+156>: ldr r1, [sp, #24]
0x00043174 <+160>: cmp r1, #2
0x00043178 <+164>: ldrne r1, [pc, #560] ; 0x433b0 <runtime.check+732>
0x0004317c <+168>: strne r1, [sp, #4]
0x00043180 <+172>: blne 0x20174 <runtime.throw>
0x00043184 <+176>: mov r1, #4
0x00043188 <+180>: str r1, [sp, #24]
0x0004318c <+184>: add r2, sp, #24
0x00043190 <+188>: str r2, [sp, #4]
0x00043194 <+192>: mov r2, #5
0x00043198 <+196>: str r2, [sp, #8]
0x0004319c <+200>: mov r2, #6
0x000431a0 <+204>: str r2, [sp, #12]
0x000431a4 <+208>: bl 0x4bea4 <runtime.cas>
0x000431a8 <+212>: ldrb r1, [sp, #16]
0x000431ac <+216>: cmp r1, #0
0x000431b0 <+220>: ldrne r1, [pc, #508] ; 0x433b4 <runtime.check+736>
0x000431b4 <+224>: strne r1, [sp, #4]
0x000431b8 <+228>: blne 0x20174 <runtime.throw>
0x000431bc <+232>: ldr r1, [sp, #24]
0x000431c0 <+236>: cmp r1, #4
0x000431c4 <+240>: ldrne r1, [pc, #492] ; 0x433b8 <runtime.check+740>
0x000431c8 <+244>: strne r1, [sp, #4]
0x000431cc <+248>: blne 0x20174 <runtime.throw>
0x000431d0 <+252>: ldr r1, [pc, #484] ; 0x433bc <runtime.check+744>
0x000431d4 <+256>: str r1, [sp, #36] ; 0x24
0x000431d8 <+260>: add r2, sp, #36 ; 0x24
0x000431dc <+264>: str r2, [sp, #4]
0x000431e0 <+268>: mov r2, #0
0x000431e4 <+272>: str r2, [sp, #8]
0x000431e8 <+276>: str r2, [sp, #12]
0x000431ec <+280>: bl 0x4bee8 <runtime.casp>
0x000431f0 <+284>: ldrb r1, [sp, #16]
0x000431f4 <+288>: cmp r1, #0
0x000431f8 <+292>: ldrne r1, [pc, #448] ; 0x433c0 <runtime.check+748>
0x000431fc <+296>: strne r1, [sp, #4]
0x00043200 <+300>: blne 0x20174 <runtime.throw>
0x00043204 <+304>: ldr r1, [sp, #36] ; 0x24
0x00043208 <+308>: add r1, r1, #1
0x0004320c <+312>: add r2, sp, #36 ; 0x24
0x00043210 <+316>: str r2, [sp, #4]
0x00043214 <+320>: ldr r2, [sp, #36] ; 0x24
0x00043218 <+324>: str r2, [sp, #8]
0x0004321c <+328>: str r1, [sp, #32]
0x00043220 <+332>: str r1, [sp, #12]
0x00043224 <+336>: bl 0x4bee8 <runtime.casp>
0x00043228 <+340>: ldrb r1, [sp, #16]
0x0004322c <+344>: cmp r1, #0
0x00043230 <+348>: ldreq r1, [pc, #396] ; 0x433c4 <runtime.check+752>
0x00043234 <+352>: streq r1, [sp, #4]
0x00043238 <+356>: bleq 0x20174 <runtime.throw>
0x0004323c <+360>: ldr r1, [sp, #36] ; 0x24
0x00043240 <+364>: ldr r2, [sp, #32]
0x00043244 <+368>: cmp r1, r2
0x00043248 <+372>: ldrne r1, [pc, #376] ; 0x433c8 <runtime.check+756>
0x0004324c <+376>: strne r1, [sp, #4]
0x00043250 <+380>: blne 0x20174 <runtime.throw>
0x00043254 <+384>: add r1, sp, #48 ; 0x30
0x00043258 <+388>: mvn r2, #0
0x0004325c <+392>: str r2, [r1]
0x00043260 <+396>: str r2, [r1, #4]
=> 0x00043264 <+400>: vldr d0, [sp, #48] ; 0x30
0x00043268 <+404>: vldr d1, [sp, #48] ; 0x30
0x0004326c <+408>: vcmpe.f64 d0, d1
0x00043270 <+412>: vmrs APSR_nzcv, fpscr
0x00043274 <+416>: ldreq r1, [pc, #336] ; 0x433cc <runtime.check+760>
0x00043278 <+420>: streq r1, [sp, #4]
0x0004327c <+424>: bleq 0x20174 <runtime.throw>
0x00043280 <+428>: vldr d0, [sp, #48] ; 0x30
0x00043284 <+432>: vldr d1, [sp, #48] ; 0x30
0x00043288 <+436>: vcmpe.f64 d0, d1
0x0004328c <+440>: vmrs APSR_nzcv, fpscr
0x00043290 <+444>: ldreq r1, [pc, #312] ; 0x433d0 <runtime.check+764>
0x00043294 <+448>: streq r1, [sp, #4]
0x00043298 <+452>: bleq 0x20174 <runtime.throw>
0x0004329c <+456>: add r1, sp, #40 ; 0x28
0x000432a0 <+460>: mvn r2, #1
0x000432a4 <+464>: str r2, [r1]
0x000432a8 <+468>: mvn r2, #0
0x000432ac <+472>: str r2, [r1, #4]
0x000432b0 <+476>: vldr d0, [sp, #48] ; 0x30
0x000432b4 <+480>: vldr d1, [sp, #40] ; 0x28
0x000432b8 <+484>: vcmpe.f64 d0, d1
0x000432bc <+488>: vmrs APSR_nzcv, fpscr
0x000432c0 <+492>: ldreq r1, [pc, #268] ; 0x433d4 <runtime.check+768>
0x000432c4 <+496>: streq r1, [sp, #4]
0x000432c8 <+500>: bleq 0x20174 <runtime.throw>
0x000432cc <+504>: vldr d0, [sp, #48] ; 0x30
0x000432d0 <+508>: vldr d1, [sp, #40] ; 0x28
0x000432d4 <+512>: vcmpe.f64 d0, d1
0x000432d8 <+516>: vmrs APSR_nzcv, fpscr
0x000432dc <+520>: ldreq r1, [pc, #244] ; 0x433d8 <runtime.check+772>
0x000432e0 <+524>: streq r1, [sp, #4]
0x000432e4 <+528>: bleq 0x20174 <runtime.throw>
0x000432e8 <+532>: mvn r1, #0
0x000432ec <+536>: str r1, [sp, #60] ; 0x3c
0x000432f0 <+540>: vldr s0, [sp, #60] ; 0x3c
0x000432f4 <+544>: vldr s2, [sp, #60] ; 0x3c
0x000432f8 <+548>: vcmpe.f32 s0, s2
0x000432fc <+552>: vmrs APSR_nzcv, fpscr
0x00043300 <+556>: ldreq r1, [pc, #212] ; 0x433dc <runtime.check+776>
0x00043304 <+560>: streq r1, [sp, #4]
0x00043308 <+564>: bleq 0x20174 <runtime.throw>
0x0004330c <+568>: vldr s0, [sp, #60] ; 0x3c
0x00043310 <+572>: vldr s2, [sp, #60] ; 0x3c
0x00043314 <+576>: vcmpe.f32 s0, s2
0x00043318 <+580>: vmrs APSR_nzcv, fpscr
0x0004331c <+584>: ldreq r1, [pc, #188] ; 0x433e0 <runtime.check+780>
0x00043320 <+588>: streq r1, [sp, #4]
0x00043324 <+592>: bleq 0x20174 <runtime.throw>
0x00043328 <+596>: mvn r1, #1
0x0004332c <+600>: str r1, [sp, #56] ; 0x38
0x00043330 <+604>: vldr s0, [sp, #60] ; 0x3c
0x00043334 <+608>: vldr s2, [sp, #56] ; 0x38
0x00043338 <+612>: vcmpe.f32 s0, s2
0x0004333c <+616>: vmrs APSR_nzcv, fpscr
0x00043340 <+620>: ldreq r1, [pc, #156] ; 0x433e4 <runtime.check+784>
0x00043344 <+624>: streq r1, [sp, #4]
0x00043348 <+628>: bleq 0x20174 <runtime.throw>
0x0004334c <+632>: vldr s0, [sp, #60] ; 0x3c
0x00043350 <+636>: vldr s2, [sp, #56] ; 0x38
0x00043354 <+640>: vcmpe.f32 s0, s2
0x00043358 <+644>: vmrs APSR_nzcv, fpscr
0x0004335c <+648>: ldreq r1, [pc, #132] ; 0x433e8 <runtime.check+788>
0x00043360 <+652>: streq r1, [sp, #4]
0x00043364 <+656>: bleq 0x20174 <runtime.throw>
0x00043368 <+660>: bl 0x42d20
0x0004336c <+664>: mov r2, #2048 ; 0x800
0x00043370 <+668>: str r2, [sp, #4]
0x00043374 <+672>: bl 0x4780c <runtime.round2>
0x00043378 <+676>: ldr r1, [sp, #8]
0x0004337c <+680>: cmp r1, #2048 ; 0x800
0x00043380 <+684>: ldrne r1, [pc, #100] ; 0x433ec <runtime.check+792>
0x00043384 <+688>: strne r1, [sp, #4]
0x00043388 <+692>: blne 0x20174 <runtime.throw>
0x0004338c <+696>: ldr pc, [sp], #104 ; 0x68
0x00043390 <+700>: b 0x43390 <runtime.check+700>
0x00043394 <+704>: blmi 0x1636c60
0x00043398 <+708>: andeq r0, r0, r10, lsr r11
0x0004339c <+712>: blcc 0xfe6f5ba4
0x000433a0 <+716>: andeq r3, r0, r9, lsr r0
0x000433a4 <+720>: andeq sp, r0, r1, lsr r4
0x000433a8 <+724>: andseq r5, r2, r9, asr #29
0x000433ac <+728>: ; instruction: 0x00125ed5
0x000433b0 <+732>: ; instruction: 0x00125eda
0x000433b4 <+736>: ; instruction: 0x00125edf
0x000433b8 <+740>: andseq r5, r2, r4, ror #29
0x000433bc <+744>: cdp2 1, 13, cr11, cr12, cr3, {1}
0x000433c0 <+748>: andseq r5, r2, r9, ror #29
0x000433c4 <+752>: andseq r5, r2, pc, ror #29
0x000433c8 <+756>: ; instruction: 0x00125ef5
0x000433cc <+760>: ; instruction: 0x00125efb
0x000433d0 <+764>: andseq r5, r2, r6, lsl #30
0x000433d4 <+768>: andseq r5, r2, r2, lsl pc
0x000433d8 <+772>: andseq r5, r2, lr, lsl pc
0x000433dc <+776>: andseq r5, r2, r10, lsr #30
0x000433e0 <+780>: andseq r5, r2, r5, lsr pc
0x000433e4 <+784>: andseq r5, r2, r1, asr #30
0x000433e8 <+788>: andseq r5, r2, sp, asr #30
0x000433ec <+792>: andseq r5, r2, r9, asr pc
End of assembler dump.

On Feb 6, 2015, at 4:23 PM, Dave Cheney notifications@github.com wrote:

Blog posts get out of date, that is why I out ye version of Go that the
post was written for in the title.

Things have changed a bit and very time, I certainly couldn't have
predicted the move to GitHub back in 2013.

Please try with 1.4 and if you are still seeing he problem run the program
under gdb and disassemble the faulting instruction. It should be simple to
fix.

Dave
On 7 Feb 2015 09:50, "Tyler" notifications@github.com wrote:

ahh..if only posts like that would be better updated to indicate they were
out of date.
I’ll try with the latest thanks!

On Feb 6, 2015, at 2:48 PM, Brad Fitzpatrick notifications@github.com
wrote:

Go no longer lives there. You were reading an 18 month old blog post.
See https://golang.org/doc/install/source <
https://golang.org/doc/install/source>

Reply to this email directly or view it on GitHub <
https://github.com/golang/go/issues/9795#issuecomment-73309560>.


Reply to this email directly or view it on GitHub
#9795 (comment).


Reply to this email directly or view it on GitHub #9795 (comment).

@davecheney

This comment has been minimized.

Contributor

davecheney commented Feb 6, 2015

It looks like that binary is still compiled with hardware floating point
support.

You will have to rebuild your go cross compile environment

cd go/src
env GOARM=5 GOARCH=arm GOOS=linux ./make.bash --no - clean

Then

env GOARM=5 GOARCH=arm GOOS=linux go install your/package
On 7 Feb 2015 12:45, "Tyler" notifications@github.com wrote:

with version go1.4.1,
it still fails for me, in the runtime check code:
Reading symbols from /usr/bin/hello...done.
(gdb) r
Starting program: /usr/bin/hello

Program received signal SIGILL, Illegal instruction.
runtime.check ()
at /home/plumbuilder/builds/go-src/go/src/runtime/runtime.c:240
240 /home/plumbuilder/builds/go-src/go/src/runtime/runtime.c: No such file
or directory.
(gdb) disassemble
Dump of assembler code for function runtime.check:
0x000430d4 <+0>: ldr r1, [r10, #12]
0x000430d8 <+4>: cmp sp, r1
0x000430dc <+8>: movls r3, lr
0x000430e0 <+12>: blls 0x47f54 <runtime.morestackc>
0x000430e4 <+16>: bls 0x430d4 <runtime.check>
0x000430e8 <+20>: str lr, [sp, #-104]! ; 0x68
0x000430ec <+24>: ldr r6, [pc, #672] ; 0x43394 <runtime.check+704>
0x000430f0 <+28>: ldr r5, [pc, #672] ; 0x43398 <runtime.check+708>
0x000430f4 <+32>: ldr r4, [pc, #672] ; 0x4339c <runtime.check+712>
0x000430f8 <+36>: str r6, [sp, #4]
0x000430fc <+40>: str r5, [sp, #8]
0x00043100 <+44>: str r4, [sp, #12]
0x00043104 <+48>: add r2, sp, #84 ; 0x54
0x00043108 <+52>: str r2, [sp, #16]
0x0004310c <+56>: bl 0x43594 <runtime.timediv>
0x00043110 <+60>: ldr r1, [sp, #20]
0x00043114 <+64>: ldr r11, [pc, #644] ; 0x433a0 <runtime.check+716>
0x00043118 <+68>: cmp r1, r11
0x0004311c <+72>: bne 0x43130 <runtime.check+92>
0x00043120 <+76>: ldr r1, [sp, #84] ; 0x54
0x00043124 <+80>: ldr r11, [pc, #632] ; 0x433a4 <runtime.check+720>
0x00043128 <+84>: cmp r1, r11
0x0004312c <+88>: beq 0x4313c <runtime.check+104>
0x00043130 <+92>: ldr r1, [pc, #624] ; 0x433a8 <runtime.check+724>
0x00043134 <+96>: str r1, [sp, #4]
0x00043138 <+100>: bl 0x20174 <runtime.throw>
0x0004313c <+104>: mov r1, #1
0x00043140 <+108>: str r1, [sp, #24]
0x00043144 <+112>: add r2, sp, #24
0x00043148 <+116>: str r2, [sp, #4]
0x0004314c <+120>: str r1, [sp, #8]
0x00043150 <+124>: mov r2, #2
0x00043154 <+128>: str r2, [sp, #12]
0x00043158 <+132>: bl 0x4bea4 <runtime.cas>
0x0004315c <+136>: ldrb r1, [sp, #16]
0x00043160 <+140>: cmp r1, #0
0x00043164 <+144>: ldreq r1, [pc, #576] ; 0x433ac <runtime.check+728>
0x00043168 <+148>: streq r1, [sp, #4]
0x0004316c <+152>: bleq 0x20174 <runtime.throw>
0x00043170 <+156>: ldr r1, [sp, #24]
0x00043174 <+160>: cmp r1, #2
0x00043178 <+164>: ldrne r1, [pc, #560] ; 0x433b0 <runtime.check+732>
0x0004317c <+168>: strne r1, [sp, #4]
0x00043180 <+172>: blne 0x20174 <runtime.throw>
0x00043184 <+176>: mov r1, #4
0x00043188 <+180>: str r1, [sp, #24]
0x0004318c <+184>: add r2, sp, #24
0x00043190 <+188>: str r2, [sp, #4]
0x00043194 <+192>: mov r2, #5
0x00043198 <+196>: str r2, [sp, #8]
0x0004319c <+200>: mov r2, #6
0x000431a0 <+204>: str r2, [sp, #12]
0x000431a4 <+208>: bl 0x4bea4 <runtime.cas>
0x000431a8 <+212>: ldrb r1, [sp, #16]
0x000431ac <+216>: cmp r1, #0
0x000431b0 <+220>: ldrne r1, [pc, #508] ; 0x433b4 <runtime.check+736>
0x000431b4 <+224>: strne r1, [sp, #4]
0x000431b8 <+228>: blne 0x20174 <runtime.throw>
0x000431bc <+232>: ldr r1, [sp, #24]
0x000431c0 <+236>: cmp r1, #4
0x000431c4 <+240>: ldrne r1, [pc, #492] ; 0x433b8 <runtime.check+740>
0x000431c8 <+244>: strne r1, [sp, #4]
0x000431cc <+248>: blne 0x20174 <runtime.throw>
0x000431d0 <+252>: ldr r1, [pc, #484] ; 0x433bc <runtime.check+744>
0x000431d4 <+256>: str r1, [sp, #36] ; 0x24
0x000431d8 <+260>: add r2, sp, #36 ; 0x24
0x000431dc <+264>: str r2, [sp, #4]
0x000431e0 <+268>: mov r2, #0
0x000431e4 <+272>: str r2, [sp, #8]
0x000431e8 <+276>: str r2, [sp, #12]
0x000431ec <+280>: bl 0x4bee8 <runtime.casp>
0x000431f0 <+284>: ldrb r1, [sp, #16]
0x000431f4 <+288>: cmp r1, #0
0x000431f8 <+292>: ldrne r1, [pc, #448] ; 0x433c0 <runtime.check+748>
0x000431fc <+296>: strne r1, [sp, #4]
0x00043200 <+300>: blne 0x20174 <runtime.throw>
0x00043204 <+304>: ldr r1, [sp, #36] ; 0x24
0x00043208 <+308>: add r1, r1, #1
0x0004320c <+312>: add r2, sp, #36 ; 0x24
0x00043210 <+316>: str r2, [sp, #4]
0x00043214 <+320>: ldr r2, [sp, #36] ; 0x24
0x00043218 <+324>: str r2, [sp, #8]
0x0004321c <+328>: str r1, [sp, #32]
0x00043220 <+332>: str r1, [sp, #12]
0x00043224 <+336>: bl 0x4bee8 <runtime.casp>
0x00043228 <+340>: ldrb r1, [sp, #16]
0x0004322c <+344>: cmp r1, #0
0x00043230 <+348>: ldreq r1, [pc, #396] ; 0x433c4 <runtime.check+752>
0x00043234 <+352>: streq r1, [sp, #4]
0x00043238 <+356>: bleq 0x20174 <runtime.throw>
0x0004323c <+360>: ldr r1, [sp, #36] ; 0x24
0x00043240 <+364>: ldr r2, [sp, #32]
0x00043244 <+368>: cmp r1, r2
0x00043248 <+372>: ldrne r1, [pc, #376] ; 0x433c8 <runtime.check+756>
0x0004324c <+376>: strne r1, [sp, #4]
0x00043250 <+380>: blne 0x20174 <runtime.throw>
0x00043254 <+384>: add r1, sp, #48 ; 0x30
0x00043258 <+388>: mvn r2, #0
0x0004325c <+392>: str r2, [r1]
0x00043260 <+396>: str r2, [r1, #4]
=> 0x00043264 <+400>: vldr d0, [sp, #48] ; 0x30
0x00043268 <+404>: vldr d1, [sp, #48] ; 0x30
0x0004326c <+408>: vcmpe.f64 d0, d1
0x00043270 <+412>: vmrs APSR_nzcv, fpscr
0x00043274 <+416>: ldreq r1, [pc, #336] ; 0x433cc <runtime.check+760>
0x00043278 <+420>: streq r1, [sp, #4]
0x0004327c <+424>: bleq 0x20174 <runtime.throw>
0x00043280 <+428>: vldr d0, [sp, #48] ; 0x30
0x00043284 <+432>: vldr d1, [sp, #48] ; 0x30
0x00043288 <+436>: vcmpe.f64 d0, d1
0x0004328c <+440>: vmrs APSR_nzcv, fpscr
0x00043290 <+444>: ldreq r1, [pc, #312] ; 0x433d0 <runtime.check+764>
0x00043294 <+448>: streq r1, [sp, #4]
0x00043298 <+452>: bleq 0x20174 <runtime.throw>
0x0004329c <+456>: add r1, sp, #40 ; 0x28
0x000432a0 <+460>: mvn r2, #1
0x000432a4 <+464>: str r2, [r1]
0x000432a8 <+468>: mvn r2, #0
0x000432ac <+472>: str r2, [r1, #4]
0x000432b0 <+476>: vldr d0, [sp, #48] ; 0x30
0x000432b4 <+480>: vldr d1, [sp, #40] ; 0x28
0x000432b8 <+484>: vcmpe.f64 d0, d1
0x000432bc <+488>: vmrs APSR_nzcv, fpscr
0x000432c0 <+492>: ldreq r1, [pc, #268] ; 0x433d4 <runtime.check+768>
0x000432c4 <+496>: streq r1, [sp, #4]
0x000432c8 <+500>: bleq 0x20174 <runtime.throw>
0x000432cc <+504>: vldr d0, [sp, #48] ; 0x30
0x000432d0 <+508>: vldr d1, [sp, #40] ; 0x28
0x000432d4 <+512>: vcmpe.f64 d0, d1
0x000432d8 <+516>: vmrs APSR_nzcv, fpscr
0x000432dc <+520>: ldreq r1, [pc, #244] ; 0x433d8 <runtime.check+772>
0x000432e0 <+524>: streq r1, [sp, #4]
0x000432e4 <+528>: bleq 0x20174 <runtime.throw>
0x000432e8 <+532>: mvn r1, #0
0x000432ec <+536>: str r1, [sp, #60] ; 0x3c
0x000432f0 <+540>: vldr s0, [sp, #60] ; 0x3c
0x000432f4 <+544>: vldr s2, [sp, #60] ; 0x3c
0x000432f8 <+548>: vcmpe.f32 s0, s2
0x000432fc <+552>: vmrs APSR_nzcv, fpscr
0x00043300 <+556>: ldreq r1, [pc, #212] ; 0x433dc <runtime.check+776>
0x00043304 <+560>: streq r1, [sp, #4]
0x00043308 <+564>: bleq 0x20174 <runtime.throw>
0x0004330c <+568>: vldr s0, [sp, #60] ; 0x3c
0x00043310 <+572>: vldr s2, [sp, #60] ; 0x3c
0x00043314 <+576>: vcmpe.f32 s0, s2
0x00043318 <+580>: vmrs APSR_nzcv, fpscr
0x0004331c <+584>: ldreq r1, [pc, #188] ; 0x433e0 <runtime.check+780>
0x00043320 <+588>: streq r1, [sp, #4]
0x00043324 <+592>: bleq 0x20174 <runtime.throw>
0x00043328 <+596>: mvn r1, #1
0x0004332c <+600>: str r1, [sp, #56] ; 0x38
0x00043330 <+604>: vldr s0, [sp, #60] ; 0x3c
0x00043334 <+608>: vldr s2, [sp, #56] ; 0x38
0x00043338 <+612>: vcmpe.f32 s0, s2
0x0004333c <+616>: vmrs APSR_nzcv, fpscr
0x00043340 <+620>: ldreq r1, [pc, #156] ; 0x433e4 <runtime.check+784>
0x00043344 <+624>: streq r1, [sp, #4]
0x00043348 <+628>: bleq 0x20174 <runtime.throw>
0x0004334c <+632>: vldr s0, [sp, #60] ; 0x3c
0x00043350 <+636>: vldr s2, [sp, #56] ; 0x38
0x00043354 <+640>: vcmpe.f32 s0, s2
0x00043358 <+644>: vmrs APSR_nzcv, fpscr
0x0004335c <+648>: ldreq r1, [pc, #132] ; 0x433e8 <runtime.check+788>
0x00043360 <+652>: streq r1, [sp, #4]
0x00043364 <+656>: bleq 0x20174 <runtime.throw>
0x00043368 <+660>: bl 0x42d20
0x0004336c <+664>: mov r2, #2048 ; 0x800
0x00043370 <+668>: str r2, [sp, #4]
0x00043374 <+672>: bl 0x4780c <runtime.round2>
0x00043378 <+676>: ldr r1, [sp, #8]
0x0004337c <+680>: cmp r1, #2048 ; 0x800
0x00043380 <+684>: ldrne r1, [pc, #100] ; 0x433ec <runtime.check+792>
0x00043384 <+688>: strne r1, [sp, #4]
0x00043388 <+692>: blne 0x20174 <runtime.throw>
0x0004338c <+696>: ldr pc, [sp], #104 ; 0x68
0x00043390 <+700>: b 0x43390 <runtime.check+700>
0x00043394 <+704>: blmi 0x1636c60
0x00043398 <+708>: andeq r0, r0, r10, lsr r11
0x0004339c <+712>: blcc 0xfe6f5ba4
0x000433a0 <+716>: andeq r3, r0, r9, lsr r0
0x000433a4 <+720>: andeq sp, r0, r1, lsr r4
0x000433a8 <+724>: andseq r5, r2, r9, asr #29
0x000433ac <+728>: ; instruction: 0x00125ed5
0x000433b0 <+732>: ; instruction: 0x00125eda
0x000433b4 <+736>: ; instruction: 0x00125edf
0x000433b8 <+740>: andseq r5, r2, r4, ror #29
0x000433bc <+744>: cdp2 1, 13, cr11, cr12, cr3, {1}
0x000433c0 <+748>: andseq r5, r2, r9, ror #29
0x000433c4 <+752>: andseq r5, r2, pc, ror #29
0x000433c8 <+756>: ; instruction: 0x00125ef5
0x000433cc <+760>: ; instruction: 0x00125efb
0x000433d0 <+764>: andseq r5, r2, r6, lsl #30
0x000433d4 <+768>: andseq r5, r2, r2, lsl pc
0x000433d8 <+772>: andseq r5, r2, lr, lsl pc
0x000433dc <+776>: andseq r5, r2, r10, lsr #30
0x000433e0 <+780>: andseq r5, r2, r5, lsr pc
0x000433e4 <+784>: andseq r5, r2, r1, asr #30
0x000433e8 <+788>: andseq r5, r2, sp, asr #30
0x000433ec <+792>: andseq r5, r2, r9, asr pc
End of assembler dump.

On Feb 6, 2015, at 4:23 PM, Dave Cheney notifications@github.com
wrote:

Blog posts get out of date, that is why I out ye version of Go that the
post was written for in the title.

Things have changed a bit and very time, I certainly couldn't have
predicted the move to GitHub back in 2013.

Please try with 1.4 and if you are still seeing he problem run the
program
under gdb and disassemble the faulting instruction. It should be simple
to
fix.

Dave
On 7 Feb 2015 09:50, "Tyler" notifications@github.com wrote:

ahh..if only posts like that would be better updated to indicate they
were
out of date.
I’ll try with the latest thanks!

On Feb 6, 2015, at 2:48 PM, Brad Fitzpatrick <
notifications@github.com>
wrote:

Go no longer lives there. You were reading an 18 month old blog post.
See https://golang.org/doc/install/source <
https://golang.org/doc/install/source>

Reply to this email directly or view it on GitHub <
https://github.com/golang/go/issues/9795#issuecomment-73309560>.


Reply to this email directly or view it on GitHub
#9795 (comment).


Reply to this email directly or view it on GitHub <
https://github.com/golang/go/issues/9795#issuecomment-73323942>.


Reply to this email directly or view it on GitHub
#9795 (comment).

@tylerarnold

This comment has been minimized.

tylerarnold commented Feb 7, 2015

that worked!

thanks,
-Tyler

On Feb 6, 2015, at 5:50 PM, Dave Cheney notifications@github.com wrote:

env GOARM=5 GOARCH=arm GOOS=linux go install your/package

@davecheney

This comment has been minimized.

Contributor

davecheney commented Feb 7, 2015

What has changed since Go 1.3 (from memory) is the decision to specialise a
go installation for a particular GOARM variant is now taken at the time the
Go runtime is installed (./make.bash, or ./all.bash), rather than when the
final program is build (GOARM=q go build).

There has been some discussion on this,
#9737

On Sat, Feb 7, 2015 at 11:03 AM, Tyler notifications@github.com wrote:

that worked!

thanks,
-Tyler

On Feb 6, 2015, at 5:50 PM, Dave Cheney notifications@github.com
wrote:

env GOARM=5 GOARCH=arm GOOS=linux go install your/package


Reply to this email directly or view it on GitHub
#9795 (comment).

@mikioh mikioh changed the title from get illegal instruction error when running a cross-compiled go program on freescale i.mx28(armv5) to cmd/5a,5l: get illegal instruction error when running a cross-compiled go program on freescale i.mx28(armv5) Feb 7, 2015

@icecreammatt

This comment has been minimized.

icecreammatt commented Aug 16, 2015

@tylerarnold Sorry to bump such an old thread, but I have not found much info on cross compiling Go binaries for this specific processor. (freescale i.mx28 armv5). Were you able to get programs to execute on this in the end?

I get an illegal instruction error message when I compile using GOARM=5. If I use GOARM=6 I get a warning about how the hardware does not support floating point and I need to compile with GOARM=5. My program is a bare bones "Hello World".

I'm hoping to run some Go binaries on a rooted Winkhub

@davecheney

This comment has been minimized.

Contributor

davecheney commented Aug 16, 2015

@icecreammatt this issue is long closed. I recommend taking your question to the golang-nuts mailing list.

@icecreammatt

This comment has been minimized.

icecreammatt commented Aug 16, 2015

@davecheney will do, sorry for the inconvenience.

@golang golang locked and limited conversation to collaborators Aug 22, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.