I am trying to cross compile a C binary from Ubuntu Trusty Tahr x64 to Arch Linux ARM on my Raspberry Pi Zero.
Here is my hello-world.c code:
#include <stdio.h>
int main(int argc, char *argv[])
{
puts("Hello world");
return 0;
}
I compiled the example using make
and successfully executed it in Ubuntu.
Then I installed arm-linux-gnueabihf-gcc
and used it to compile my example. When I execute the binary on Arch Linux however, I receive a Segmentation Fault.
What went wrong?