Binary modifications

I would like to know if it is possible to modify a binary file with
some custom assembly instructions. Specifically, I want to add some
jump instruction at the end of some basic blocks that I want to
reorder. Is there any starting point for that?


I don't think clang/llvm provides much in the way of infrastructure
that would help with that task. I've seen things like that done with fwiw.