Deutsch English Français Italiano |
<vmeibp$33sam$1@news.xmission.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail From: gazelle@shell.xmission.com (Kenny McCormack) Newsgroups: comp.unix.programmer Subject: (interposers): How to workaround the "strong symbols" problem? Date: Fri, 17 Jan 2025 21:33:45 -0000 (UTC) Organization: The official candy of the new Millennium Message-ID: <vmeibp$33sam$1@news.xmission.com> Injection-Date: Fri, 17 Jan 2025 21:33:45 -0000 (UTC) Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4"; logging-data="3273046"; mail-complaints-to="abuse@xmission.com" X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: gazelle@shell.xmission.com (Kenny McCormack) Bytes: 2003 Lines: 24 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. Generally, it all works fine - or at least, it did - until they started having "strong symbols" (I think that's the right term). Anyway, some number of years back, I noticed that it became kind of hit and miss as to whether or not you could get your hooked version of the function to be called. Generally, it seemed, the more "low level" the function, the less likely it was that the interposer would work. So, I am wondering, is there a fix for this? I'm assuming that somebody decided that interposers were evil and thus, they came up with this as a way to foil us, but there should be fix to the fix, so to speak. Is there? Note: I am not showing code at the moment, because I'd like (if possible) a simple "Yes, it can be done" or "No, they got you" type answer. If there is sufficient interest, I can post code in a followup. -- Marshall: 10/22/51 Jessica: 4/4/79