<div dir="ltr"><div>Cool. I've almost done the disassembly part. Any hint on how to translate from MCInst to ELF binary? E.g., which LLVM tool to use? I only find tools effective on LLVM Bitcode.</div><div>Thanks so much again.<br>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 18, 2013 at 7:48 PM, James Courtier-Dutton <span dir="ltr"><<a href="mailto:james.dutton@gmail.com" target="_blank">james.dutton@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>How about:<br><a href="http://blog.llvm.org/2010/01/x86-disassembler.html" target="_blank">http://blog.llvm.org/2010/01/x86-disassembler.html</a><br>

<br></div><div>This is what llvm-objdump does:<br>
</div>It has some steps:<br></div>1) Define the target<br></div>2) Initialize the tables.<br></div>3) Decode binary to MCInst<br></div>4) Print MCInst in ATT or Intel format.<br><br><div><div>You would need to modify it to use the ARM target.<br>


</div><div>You just need to skip step (4)<br><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On 18 September 2013 22:07, Yue Chen <span dir="ltr"><<a href="mailto:ycyc54321@gmail.com" target="_blank">ycyc54321@gmail.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><br><div>Hi, Dear LLVM Dev Group,</div><div><br></div><div>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.</div>





<div><br></div><div>As I used the llvm-mc, it seems to only have the option "llvm-mc -disassemble", which reads strings and output strings. Is there any command or function that can take a binary, and translates it to the MCInst format, finally translating back to a binary? </div>





<div><br></div><div>Thanks a million for your help.</div><div><br></div><div>Best,</div></div>
<br></div></div><div class="im">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></div></blockquote></div><br></div>
</blockquote></div><br></div></div>