[DynInst_API:] How to insert raw bytes into binary.


Date: Mon, 12 Jan 2015 13:32:50 +0100
From: Xi Chen <xi.chen.chn@xxxxxxxxx>
Subject: [DynInst_API:] How to insert raw bytes into binary.
Hi everyone,
 I am new to dyninst and currently working on a binary rewriting project. At some point, I want to insert raw bytes instruction as the snippet and insert them into binary. For example insert "0x90"(nop) at the begining of every basic blocks, or using dynamorio's decode/encode library to generate the raw byte and convert them into snippet. Could you point me out some API to do this?Â
 A further question is how to control the rewritted BB's address. For example, when I follow the craftphc way to replace some instruction, the new BB itself is sitting in a new address, is there anyway to control the address of new inserted BBs?
 Thanks in advance.
 Have a nice day.Â

--
Best Regards
X.Chen


[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] How to insert raw bytes into binary., Xi Chen <=