3 ms·
ATOM could inject code before or after any basic block in a program: https://dl.acm.org/doi/abs/10.1145/178243.178260 https://dl.acm.org/doi/abs/10.1145/178243.
by etune 1y ago
ATOM could inject code before or after any basic block in a program: https://dl.acm.org/doi/abs/10.1145/178243.178260 https://dl.acm.org/doi/abs/10.1145/178243.178260. The general technique, IIRC, was to replace the first instruction of the basic block with a jump to code that contained your new code and then the overwritten instructions, and then jump back into the original code.
- dillstead 1y agoYes, I've implemented this technique before at my job. Relocating assembly instructions especially those that contain branching logic can be tricky as the offsets have to be recomputed or a new instruction needs to be used instead. More often that not, you may not have enough space for that new instruction.
- nicholasmoser 1y agoThis is also similar to what is done with video game modification (think Gecko, Game Shark, Game Genie).