I was trying to cross compile a simple hello program as stand alone application which will run as binary on arm board, but I am facing problem while running hello binary on arm board.
Below are steps I have followed : -
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- hello
Now hello is successfully build when I check file type of hello using file command : -
$file hello hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.31, BuildID[sha1]=0x68edccf6dba1057774e3d7853914578e53889a75, not stripped
When I push this binary in Android Linux phone under /data folder
1- adb push hello /data
2-chmod 777 /data/hello
3- ./hello (but here hello is not able to run)
Can somebody give me hint what mistakes I am making while compling or running binary on phone.
I am getting strange error messages while running program as shown below : -
root@xxx:/data # ./hello
./hello
Open failed: No such file or directory
1|root@xxx:/data # sh hello
sh hello
hello[1]: syntax error: '☺üê4┤¡♣☻♣4' unexpected
1|root@xxx:/data #