root@desktop:~/work/test# pwd
/root/work/test
root@desktop:~/work/test# ls -al
total 12
drwxr-xr-x 2 root root 4096 2011-03-17 20:14 .
drwxr-xr-x 7 root root 4096 2011-03-17 20:12 ..
-rw-r--r-- 1 root root 71 2011-03-17 20:14 test.c
root@desktop:~/work/test# cat test.c
#include <stdio.h>
int main()
{
printf("2011 SOS\n");
return 0;
}
root@desktop:~/work/test# gcc -o hello_x86 ./test.c
root@desktop:~/work/test# ls -al
total 24
drwxr-xr-x 2 root root 4096 2011-03-17 20:15 .
drwxr-xr-x 7 root root 4096 2011-03-17 20:12 ..
-rwxr-xr-x 1 root root 9040 2011-03-17 20:15 hello_x86
-rw-r--r-- 1 root root 71 2011-03-17 20:14 test.c
root@desktop:~/work/test# ./hello_x86
2011 SOS
root@desktop:~/work/test# arm-linux-gcc -o hello_arm ./test.c
root@desktop:~/work/test# ls -al
total 36
drwxr-xr-x 2 root root 4096 2011-03-17 20:15 .
drwxr-xr-x 7 root root 4096 2011-03-17 20:12 ..
-rwxr-xr-x 1 root root 11499 2011-03-17 20:15 hello_arm
-rwxr-xr-x 1 root root 9040 2011-03-17 20:15 hello_x86
-rw-r--r-- 1 root root 71 2011-03-17 20:14 test.c
root@desktop:~/work/test# ./hello_arm
bash: ./hello_arm: cannot execute binary file