4 ms·
Does ld_preload work for static binaries?
by neerajsi 6y ago
Does ld_preload work for static binaries?
- uselesscynicism 6y agohttps://stackoverflow.com/questions/60450102/why-does-ld-preload-work-with-syscalls https://stackoverflow.com/questions/60450102/why-does-ld-pre... > No, it doesn't. A static binary has no need to resolve any symbol dynamically, and therefore the dynamic loader is not invoked to resolve the usual library function symbols.
- chunkyks 6y agoAh, I missed that part. No, LD_PRELOAD isn't going to be able to overwrite statically linked functions
- touisteur 6y agoNot for fully static, but apart from go programs those are pretty rare, right? For everything-static-but-libc it's still OK.