summaryrefslogtreecommitdiff
path: root/src/hook.S
Commit message (Collapse)AuthorAgeFilesLines
* Move to static trampolines and type-safe hooksGravatar Michael Smith 2026-02-161-26/+0
| | | | | | | | | | | | | | | | | For some reason the DLL got a tiny little bit bigger again but that's fine. This will make orig_ calls more efficient in the inline case, and also make it harder to screw up and hook the wrong thing by mistake. Self-explanatory-ish, apart from the fact it's a fairly large API change of course. And it relies on some more bonkers assembler directive hackery. But it works! The only complaint one might have is that the featsetup functions no longer take an explicit string which occasionally yields slightly less perfect error messages, but I've decided this isn't really a problem and makes the API nicer to use. It's a tradeoff, innit.
* Move to a shared static RWX sectionGravatar Michael Smith 2026-02-161-0/+26
Does away with the need to mark a region as executable on load. Also allows the self-modified stuff and hook trampolines to fit in the same page, so we take up ever-so-slightly less memory. Unfortunately I had issues getting the test binary to build correctly and eventually decided to give up as it wasn't testing much of value anyway. Also note that the build now allows for .c and .S files with the same basename, which required renaming the .o files, so you might want to clean out your .build/ directory before building this one.