Re:On self-modifying executables in Rust
by ktpsns on Friday January 28, 2022 @06:23PM
(#30121882)
Compiling code at runtime is not self-modifying. For instance, in GPGPU programming, the kernels (=code running on GPUs) are usually compiled at runtime. And of course any time of JITs in scripting languages do the same.
[ Parent
| on HN ]
Re:On self-modifying executables in Rust
by smasher164 on Friday January 28, 2022 @07:04PM
(#30122250)
What about rewriting CPU feature-detection code to remove branching?
Re:On self-modifying executables in Rust
by dataflow on Friday January 28, 2022 @08:46PM
(#30122921)
Yeah, I think this is the answer to OP's question.
Re:On self-modifying executables in Rust
by aaaaaaaaaaab on Friday January 28, 2022 @06:29PM
(#30121945)
Ok, then consider a lazy-loading dynamic linker that rewrites the thunks when the library is loaded.