Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to verify LD_PRELOAD is running?

I know that LD_PRELOAD is set my so library before any another so libraries.

LD_PRELOAD=my_lib.so ./my_exec

How can I watch it? Is there any path like /proc/pid/... that show the order of libraries that loaded for this process?

like image 469
Lpoiu0099 Avatar asked Jan 24 '26 04:01

Lpoiu0099


1 Answers

Look in /proc/$pid/maps, you should see the library there if it's loaded. As for checking the order of loading, the "before" part is by definition, to quote the man page:

LD_PRELOAD

A list of additional, user-specified, ELF shared objects to be loaded before all others.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!