I want to alter a ELF executable function call and replace one of it's parameters.
The executable calls dlopen()
function and passes RTLD_NOW
as the flag parameter.
I want to change it to RTLD_LAZY
.
What's the easiest way to detect the exact place where this call is done, and replacing the parameter.
I have to do it on production environment, so I only have GNU toolchain, gcc, gdb, etc.
LD_PRELOAD
would be your friend, but given thatdlopen
is implemented within the loader, it's possible that this approach would fail.