Tag: system

The LD_PRELOAD trick

If you ever wanted to replace some symbol in a library, in order to inspect what happens in a binary you don’t have the source code or even to inject some code, this can be done using the LD_PRELOAD trick. To use it, invoke your binary as such: $ LD_PRELOAD=somelib.so executable.

Continue reading »