<p dir="auto">by <strong><a href="mailto:andrew@andreworr.ca">andrew@andreworr.ca</a></strong>:</p>
<pre class="notranslate">On an arm5tejl processor running an eabi linux kernel *without* thumb support, executing
a golang binary (compiled with GOARM=5) will result in a segfault when the
rt0_linux_arm.s tries to branch to thumb code in order to set up the OABI check.

I was able to monkey patch this for my situation by commenting out the thumb part as
shown here:
<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/xorrbit/golang/commit/42667df7216df6d9014fb4c4ea75d718d55491f9/hovercard" href="https://github.com/xorrbit/golang/commit/42667df7216df6d9014fb4c4ea75d718d55491f9">xorrbit/golang@<tt>42667df</tt></a>. After
compiling my binaries with this patched copy of the golang compiler I was able to
execute them fine.

I looked into the history of this OABI check and I'm not sure that there is a better way
to do it. It is unfortunate that this is the only tiny bit of thumb code that is
generated, and that it causes a segfault if you run it on a kernel without thumb support.

Granted, this is probably a somewhat rare situation (running a kernel without thumb
support on a processor that supports thumb). I talked to the devs who ship this kernel
and there is no particular reason thumb isn't enabled, the processor supports it but
they never required it. This is all on a custom board running a custom kernel.

I thought I would log this here anyways in case anyone else encountered this problem. A
fix would be great but I can't find of a proper way to fix this that would add more
complexity.

Thanks</pre>
<p dir="auto">by <strong>Andreas.Klauer</strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?

1. <a href="http://play.golang.org/p/KQF7Xz5os7" rel="nofollow">http://play.golang.org/p/KQF7Xz5os7</a>
2. Format [X] Imports

What is the expected output?

package main

import "fmt"

// Is this a bug?
func main() {
    fmt.Println("Hello, playground")
}


What do you see instead?

package main

import "fmt"

func main() {
    fmt.Println("Hello, playground")
}
// Is this a bug?


Another example: <a href="http://play.golang.org/p/7-jPpVyYU4" rel="nofollow">http://play.golang.org/p/7-jPpVyYU4</a> (hit format with imports)</pre>