This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Problem with LD_PRELOAD
- From: Ian Lance Taylor <ian at airs dot com>
- To: Manuel Arriaga <m dot arriaga at ip dot pt>
- Cc: binutils at sources dot redhat dot com
- Date: 19 Mar 2002 15:24:45 -0800
- Subject: Re: Problem with LD_PRELOAD
- References: <EXCH01SMTP017yRLVbN00006263@smtp.netcabo.pt>
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