[cfe-dev] Question about hotpatching
Dovod Dovodov via cfe-dev
cfe-dev at lists.llvm.org
Wed Dec 19 01:48:50 PST 2018
I have a question about hotpatching supporting code.
MSVC compiler can compile code able to be patched "on the fly" by inserting
dummy function preamble and reserving some space before function body to
allow to redirect execution flow to another place using unconditional jump.
This behaviour is controlled by /hotpatch and /functionpadmin compiler and
I need to achieve something like this, but using clang/lld under Linux and
The thing is I didn't find any options in clang to do this, probably I'm
The only idea I came up with is to compile my code with
-finstrument-function-entry-bare to reserve some space in the beginning of
each function for later code injection, but it leads to too much overhead.
Probably you're aware of better approach?
Will be grateful for any help, thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev