Quantcast
Channel: What is the LD_PRELOAD trick? - Stack Overflow
Viewing all articles
Browse latest Browse all 10

Answer by JesperE for What is the LD_PRELOAD trick?

$
0
0

If you set LD_PRELOAD to the path of a shared object, that file will be loaded before any other library (including the C runtime, libc.so). So to run ls with your special malloc() implementation, do this:

$ LD_PRELOAD=/path/to/my/malloc.so /bin/ls

Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>