<div dir="ltr"><div><div><div><div>Thanks a lot Tim.<br><br></div>I am getting an error which says: "LLVM ERROR: unable to write nop sequence of 0 bytes"<br></div>Is there any way that I can print out the Obj code (I mean bitstream representation of the assembly code which is going to be placed in the ELF file), before making any ELF file?<br><br></div>Cheers,<br></div>ES<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 13, 2015 at 3:02 PM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 13 October 2015 at 02:19, Sky Flyer via llvm-dev<br>
<span class=""><<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
> I tried this commands, but it didn't work corrctly:<br>
><br>
> llvm-mc -filetype=obj -arch=test file.s -o=a.o<br>
<br>
</span>That looks right to me ("-triple test-elf" might be more robust and<br>
work if you're coding on OS X or Windows).<br>
<span class=""><br>
> and I think after an obj file is built, I should use this command but I am<br>
> not sure!<br>
><br>
> llvm-objdump -arch=test a.o<br>
<br>
</span>Either llvm-objdump or llvm-readobj will work. llvm-readobj tends to<br>
produce lower level information, while llvm-objdump is more<br>
user-friendly. They ought to mostly work on the generic information<br>
without changes.<br>
<br>
If you want "-d" (disassemble) to work, you're going to have to<br>
implement a Disassembler in your target too.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br></div>