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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With