c++ - How to check what shared libraries are loaded at run time for a given process? -


is there way check libraries running process using?

to more specific, if program loads shared libraries using dlopen, readelf or ldd not going show it. possible @ information running process? if yes, how?

other people on right track. here couple ways.

cat /proc/nnnn/maps | awk '{print $6}' | grep '\.so' | sort | uniq 

or, strace:

strace cmd.... 2>&1 | grep '^open(".*\.so"' 

both of these assume shared libraries have ".so" somewhere in paths, can modify that. first 1 gives pretty output list of libraries, 1 per line. second 1 keep on listing libraries opened, that's nice.

edit: , of course lsof...

lsof -p nnnn | awk '{print $9}' | grep '\.so' 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -