c++ - Segfault when using arm-linux-gnueabi-g++ -o, no problems without -o -


i trying cross-compile code run on arm cortex a8 (the ar.drone 2.0, if makes difference).

i installed ubuntu 12.04 lts 32-bit on virtualbox (with windows 7 64-bit host), , cross-compiled code works fine.

on computer, installed same version of ubuntu (without virtualbox), i'm encountering weird errors. smallest code snippet i've gotten demonstrates problem "hello world" program (i can show code here if necessary):

  • i've executed: sudo apt-get install g++ gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
  • when run arm-linux-gnueabi-g++ hello.cpp, cross-compiled code (a.out) works fine on arm.
  • when run arm-linux-gnueabi-g++ -o hello hello.cpp, segfault when executing hello on arm.
  • i've compared outputs of file hello , read-elf -a hello when compiled virtualbox , without, , identical.
  • i don't have gdb on arm, can't gdb find out segfault coming from.

any ideas/solutions appreciated. did not have set special on virtualbox, i'm quite confused why pc without virtualbox cannot cross-compile correctly.

if using filezilla or make sure not using "auto" transfer mode. choose "binary", had same problem transferring simple hello world program ubuntu arm target (xilinx zynq) , after hours spent investigating checked md5 of executable both on ubuntu , target discovering different.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -