[問題] 請教toolchain編譯後的程式不能執行問題?

作者: awaysu (阿偉蘇)   2014-05-08 18:24:33
Dear All,
請教各位
我按照網路上教學下載arm的toolchain以及busybox
(arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2)
最後可以順利編譯且執行busybox
之後我自己寫了一個printf的程式然後編譯
arm-none-linux-gnueabi-gcc -o hello.out -Wall main.c
沒想到在板子執行後卻發生
shell@android:/mnt/sdcard/Download/test # ./hello.out
sh: ./hello.out: No such file or directory
可以請教是甚麼原因嗎?
是否有少flag?感謝!
作者: goldie (阿良)   2014-05-08 18:54:00
檔案缺乏可執行權限,chmod a+x hello.out
作者: enthos (影斯作業系統)   2014-05-08 20:26:00
arm-none-linux-gnueabi-gcc -static -o hello.out main.c

Links booklink

Contact Us: admin [ a t ] ucptt.com