I am going to do a research project that inserts instructions (e.g.,
JMP) after each code basic block at runtime of a program (when the
program is already loaded into memory).
I believe first I should allocate (reserve) more memory space (could
be filled with "NOP" instructions) after each basic block during
compilation in order to put the extra instructions thereafter.
Could anyone tell me how to implement it in LLVM for 32-bit x86
platform? E.g., which functions or data structures or materials of
LLVM I should look at or refer to.
I really appreciate your kind help.