luther@gliethttp:~$ ll /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/sbin/
total 1.3M
-rwxr-xr-x 2 luther luther 574K 2008-11-18 23:07 sln
-rwxr-xr-x 2 luther luther 739K 2008-11-18 23:07 ldconfig
luther@gliethttp:~$ ll /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/bin
total 760K
-rwxr-xr-x 2 luther luther 6.4K 2008-11-18 22:29 mtrace
-rwxr-xr-x 2 luther luther 6.8K 2008-11-18 22:29 tzselect
-rwxr-xr-x 2 luther luther 5.2K 2008-11-18 22:29 xtrace
-rwxr-xr-x 2 luther luther 3.4K 2008-11-18 22:29 catchsegv
-rwxr-xr-x 2 luther luther 5.5K 2008-11-18 22:30 ldd
-rwxr-xr-x 2 luther luther 100K 2008-11-18 23:07 gdbserver
-rwxr-xr-x 2 luther luther 32K 2008-11-18 23:07 sprof
-rwxr-xr-x 2 luther luther 84K 2008-11-18 23:07 rpcgen
-rwxr-xr-x 2 luther luther 8.7K 2008-11-18 23:07 pcprofiledump
-rwxr-xr-x 2 luther luther 301K 2008-11-18 23:07 localedef
-rwxr-xr-x 2 luther luther 40K 2008-11-18 23:07 locale
-rwxr-xr-x 2 luther luther 58K 2008-11-18 23:07 iconv
-rwxr-xr-x 2 luther luther 26K 2008-11-18 23:07 getent
-rwxr-xr-x 2 luther luther 21K 2008-11-18 23:07 getconf
-rwxr-xr-x 2 luther luther 23K 2008-11-18 23:07 gencat
其中ldd程序为shell脚本,如果使用busybox作为shell的话,那么如果想在arm开发板上正常使用ldd程序,那么就需要作如下修改:
luther@gliethttp:~$ cp /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/bin/ldd /vobs/initramfs/usr/bin
luther@gliethttp:~$ vim /vobs/initramfs/usr/bin/ldd
将第一行原有的用/bin/bash执行该ldd脚本程序,
#! /bin/bash
替换为,用busybox的sh执行该ldd脚本程序.
#! /bin/sh
http://blog.chinaunix.net/u1/38994/showart_2029920.html
/opt/arm-2008q3/arm-none-linux-gnueabi/libc/usr/bin/ldd
将
#! /bin/bash
修改为
#!/system/bin/sh
bash-3.2# ldd SmsCmmbSample
libsmscontrol.so => /lib/libsmscontrol.so (0x40026000)
libpthread.so.0 => /lib/libpthread.so.0 (0x400b9000)
librt.so.1 => /lib/librt.so.1 (0x400d8000)
libstdc++.so.6 => /lib/libstdc++.so.6 (0x400e7000)
libm.so.6 => /lib/libm.so.6 (0x401bc000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40269000)
libc.so.6 => /lib/libc.so.6 (0x4027d000)
/lib/ld-linux.so.3 (0x40000000)
/opt/arm-2008q3/arm-none-linux-gnueabi/libc/lib
/opt/arm-2008q3/arm-none-linux-gnueabi/libc/usr/lib
在这两个目录中包含 使用arm-none-linux-gnueabi交叉编译时需要的库文件,将文件夹下的动态库copy到开发板/lib目录下。
运行编译好的可执行文件,可以使用“ldd+可执行文件名”查看执行这个程序需要哪些动态库。
/opt/arm-2008q3/arm-none-linux-gnueabi/libc/usr 这个目录下竟然连locale都有。。。