[SOLVED] Hello World Segfaults


I am having trouble cross-compiling from Debian ‘testing’ to Raspbian jessie.

I followed the instructions here: https://github.com/japaric/ruststrap/blob/master/1-how-to-cross-compile.md from the FAQ.

The only major difference is Debian is using a more recent version of gcc to link than mentioned in the documentation above (it referred to 4.8 I believe).

And can successfully compile and produce an executable but when I attempt to run it segfaults

> Program received signal SIGSEGV, Segmentation fault.
> 0x7f5a7042 in ?? ()
> (gdb) bt
> #0  0x7f5a7042 in ?? ()
> #1  0x7f557e8e in _start () at ../sysdeps/arm/start.S:93

The program is just the helloworld created by cargo.


I was able to resolve this by using the soft float abi. Don’t know why but its not a priority to me.

So instead of targeting arm-unknown-linux-gnueabihf I targetted arm-unknown-linux-gnueabi (not “hf” hard-float at the end).