标签云

微信群

扫码加入我们

WeChat QR Code


You will probably not be able to get an exact number if the executables use dlopen.

2018年09月26日30分36秒

This is a great answer (I've up-voted it) but can you explain the "grep -P '\t.*so'" command? According to man, this interprets the pattern as a perl regexp, but my version of grep doesn't support it (man indicates this is a general issue). What bit of the regexp is perl-specific?

2018年09月27日30分36秒

I think you may need to use ldd -v

2018年09月26日30分36秒

Be aware that ldd actually runs the executable with a special environment variable, and the Linux dynamic linker recognizes this flag and just outputs the libraries rather than running the executable. Look at the source to ldd; on my system, it's a bash script. If the executable is statically linked and uses syscalls, and specifies a different loader, it can do arbitrary evil things. So don't use ldd on an executable you don't trust.

2018年09月27日30分36秒

This should be safe too, unlike ldd which shouldn't be used on untrusted executables.

2018年09月27日30分36秒

Used this to find out if mariadb was actually using tc-malloc, which gets loaded by LD_PRELOAD. Works great.

2018年09月26日30分36秒

I was looking for something that would show me '.so' for a given pid. This is exactly what I needed. Thanks!

2018年09月27日30分36秒

objdump is nice one and thanks for that.. +1

2018年09月26日30分36秒

Of course there is lsof on OS X.

2018年09月26日30分36秒