busybox filesystem add ldd function

时间:2023-03-09 09:27:14
busybox filesystem add ldd function
/********************************************************************
* busybox filesystem add ldd function
* 声明:
* 本文主要是为了解决缪新建提出的查看程序涉及到动态链接库的问题。
*
* 2016-1-23 深圳 南山平山村 曾剑锋
*******************************************************************/ 一、参考文章:
where is 'ldd'?
http://buildroot-busybox.2317881.n4.nabble.com/where-is-ldd-td48070.html 二、解决办法:
. You really don't need a special ldd. ldd is just a script. In its most basic usage (ldd <executable>), it just runs:
# LD_TRACE_LOADED_OBJECTS= <executable>
. For example on busybox:
# LD_TRACE_LOADED_OBJECTS= /bin/busybox
linux-vdso32.so. => (0x00100000)
libc.so. => /lib/libc.so. (0x0fe70000)
/lib/ld.so. (0x48000000 三、测试效果:
[zengjf@root ]# LD_TRACE_LOADED_OBJECTS= /bin/busybox
libm.so. => /lib/libm.so. (0x2ac8c000)
libc.so. => /lib/libc.so. (0x2acf6000)
/lib/ld-linux-armhf.so. (0x2aae1000)
[zengjf@root ]# LD_TRACE_LOADED_OBJECTS= /bin/main
hello world.
[zengjf@root ]# ls
main mainso
[zengjf@root ]# LD_TRACE_LOADED_OBJECTS= /bin/mainso
libc.so. => /lib/libc.so. (0x2abea000)
/lib/ld-linux-armhf.so. (0x2ab1b000)
[zengjf@root ]#