Problem with LD_PRELOAD
Ian Lance Taylor
ian@airs.com
Tue Mar 19 15:24:00 GMT 2002
Manuel Arriaga <m.arriaga@ip.pt> writes:
> So my question is: why aren't all calls to open() being redirected to the
> preloaded object? Why does this redirection only work in some cases?
I would guess that cp is not calling open(). strace does not report
the libc functions called by a program. It reports the system calls
called by a program. I would guess that cp is calling some libc
function which calls the system call open(). Use objdump -T to see
which dynamic symbols appear in cp; if open() is not one of them, then
using LD_PRELOAD will not be able to intercept calls to open().
Ian
More information about the Binutils
mailing list