Sujet : Re: (interposers): How to workaround the "strong symbols" problem?
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.programmerDate : 19. Jan 2025, 18:12:12
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vmjbpc$369bd$1@news.xmission.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
wwvsepessby.fsf@LkoBDZeT.terraraq.uk>,
Richard Kettlewell <
invalid@invalid.invalid> wrote:
...
System call can mean two things:
>
1) The actual transfer to the kernel, via an instruction such as SYSCALL
(x86) or SVC (Arm). This is what appears in strace.
2) The function in the C library that contains this instruction.
>
Normally the distinction is irrelevant, but here it matters.
>
You cant interpose a syscall, is only true for sense 1. That
instruction is somewhere the middle of a function and the interposition
technique hes using relies on runtime symbol resolution rules, so it
doesnt apply to sense-1 syscalls.
When I wrote "syscall", I meant (surprisingly enough) syscall.
What you are calling "sense #1".
So, what I wrote is correct.
What you are calling "sense #2" (i.e., the "glibc wrapper" that is provided
for most (not all) syscalls) is just another function and can, of course,
be interposed.
-- Watching ConservaLoons playing with statistics and facts is like watching anewborn play with a computer. Endlessly amusing, but totally unproductive.