Comment 0 for bug 1135120

Revision history for this message
tomdean (tomdean) wrote :

GCC Bugzilla – Bug 56473

I cross compiled a simple application, int main(){return 0;} on Ubuntu with
> arm-linux-gnueabihf-gcc-4.6 -g -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -marm hello.c -Wl,-t -o hello
When executed on a Raspberry Pi, it produced a segment fault.

If I compile on ubuntu and link on the Raspberry Pi, it works as expected.

 >lsb_release -rd
Description: Ubuntu 12.04.2 LTS
Release: 12.04
>apt-cache policy gcc-4.6-arm-linux-gnueabihf
gcc-4.6-arm-linux-gnueabihf:
  Installed: 4.6.3-1ubuntu5cross1.63
  Candidate: 4.6.3-1ubuntu5cross1.63
  Version table:
 *** 4.6.3-1ubuntu5cross1.63 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status