- Published on
Investigation · Part 9 of 20 · From source to a running process
How LD_PRELOAD Replaces a Function Without Recompiling
I wrote a small library that counts malloc calls and preloaded it into C, Rust and ls. The famous dlsym trap did not appear with glibc 2.43, but ls hid my output in a way I did not expect, and the static binary ignored the library completely.