I am doing an LLVM project aimed to disassemble an ARM ELF binary executable to the MCInst format, inserting some instructions or doing some modification, and re-assemble the MCInst to an ELF binary.
I used llvm-objdump to do the first part of the job. But after searching for a long time, I still cannot figure out how to translate the MCInst back to a binary.
Could anyone kindly tell me which tool or function of LLVM is useful for doing this? And what is the best way to store the intermediate MCInst? e.g., store them just in memory or store them in a file, which function could store and read them in a decent way?
I really appreciate any of your help, even just one point.