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

作者: Spig (Spig)   2014-05-08 20:54:48
※ 引述《awaysu (阿偉蘇)》之銘言:
: 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?感謝!
缺少必要的 share objects
$ LD_TRACE_LOADED_OBJECTS=1 /bin/bash
linux-vdso.so.1 => (0x00007fffb25fe000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f839d112000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f839cf0e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f839cb4f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f839d339000)
可以使用 LD_TRACE_LOADED_OBJECTS=1 檢查所缺少的 so 檔或是直接做 static link

Links booklink

Contact Us: admin [ a t ] ucptt.com