Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Muttley@DastardlyHQ.org Newsgroups: comp.unix.programmer Subject: Re: (interposers): How to workaround the "strong symbols" problem? Date: Mon, 20 Jan 2025 09:41:41 -0000 (UTC) Organization: A noiseless patient Spider Lines: 24 Message-ID: References: Injection-Date: Mon, 20 Jan 2025 10:41:41 +0100 (CET) Injection-Info: dont-email.me; posting-host="814144b7c7b1a7e5b7bbd80827eada59"; logging-data="3191868"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18d1QCqZvcOmIadvc7AtB+N" Cancel-Lock: sha1:1WSKwItwSuxbILck7j365C2qPHM= Bytes: 2038 On Sun, 19 Jan 2025 16:04:33 +0000 Richard Kettlewell wibbled: >Marcel Mueller writes: >> Am 18.01.25 um 01:42 schrieb Kenny McCormack: >>> Right. It seems to boil down to: >>> You can't interpose a syscall. >>> I.e., so if a library function calls the syscall directly (rather >>> than going through the Glibc wrapper), you can't interpose it. This >>> is, of course, as it should be. >> >> Hmm, it may be related to optimizations. Assuming the openat call is >> inlined in another compilation unit there is no option to change this >> at link time. > >Inlining and compiler optimization aren’t relevant here. > >“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. On a slight tangent, does anyone know of a good reference for how to use the ptrace() call on Linux? The man page is somewhat obtuse.