Sujet : Re: (interposers): How to workaround the "strong symbols" problem?
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.programmerDate : 17. Jan 2025, 22:53:32
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vmejgs$33sam$2@news.xmission.com>
References : 1
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
vmeibp$33sam$1@news.xmission.com>,
Kenny McCormack <
gazelle@shell.xmission.com> wrote:
Context is Linux (and only Linux).
>
Over the years, I have written many "interposers" - that is, a shared
library loaded with LD_PRELOAD that hooks some system or library call
(e.g., "read"). The interposer usually ends up calling the "real"
function, then doing something special either before or after the call.
Also, wanted to state that the function I am trying to hook is "openat".
"open" I can hook, but "openat" doesn't work. I think most programs just
call "open", which eventually ends up calling "openat", so that (hooking
"open") works. But some programs call "openat" directly, and that doesn't
work.
And, also, just to clarify, the whole point of this is to modify the
behavior of a program without the bother of re-compiling it.
-- The randomly chosen signature file that would have appeared here is more than 4lines long. As such, it violates one or more Usenet RFCs. In order to remainin compliance with said RFCs, the actual sig can be found at the following URL: http://user.xmission.com/~gazelle/Sigs/Pearls