<div dir="ltr">What happens if you use the standard bunutils objdump e.g. from macports package arm-elf-binutils (if you're on a Mac)?<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 20, 2016 at 12:45 AM, Johan Wehrli via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Everyone,<br>
<br>
When I used llvm-objdump to disassemble an ELF armv7 or thumb I have this error message:<br>
<br>
llvm-objdump: warning: invalid instruction encoding<br>
<br>
This message appears directly into the output and the output is mostly wrong (the invalid instruction create a shift in the addresses) :<br>
<br>
<br>
1a6d: ff 2f e1 08 stmeq r1!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, sp} ^<br>
1a71: 30 90 e5 00 rsceq r9, r5, r0, lsr r0<br>
1a75: 10 a0 e1 00 rsceq r10, r1, r0, lsl r0<br>
1a79: 00 53 e3 1e cdpne p3, #14, c5, c3, c0, #0<br>
llvm-objdump: warning: invalid instruction encoding<br>
1a7e: 2f 01 01 00 andeq r0, r1, pc, lsr #2<br>
llvm-objdump: warning: invalid instruction encoding<br>
1a83: e3 13 ff 2f svchs #16716771<br>
llvm-objdump: warning: invalid instruction encoding<br>
<br>
The binaries I try to read are c++ dynamic libraries for Android.<br>
<br>
I have used the following parameters:<br>
<br>
-llvm-objcdump mylib.so -d -arch=arm<br>
-llvm-objcdump mylib.so -d -arch=armv7<br>
-llvm-objcdump mylib.so -d -arch=thumb<br>
<br>
or with the following triples:<br>
<br>
armv7-none-linux-android<br>
thumbv7-none-linux-android<br>
<br>
Does anyone know why I have this error? Am I missing some input parameters?<br>
<br>
This is strange because it works great on iOS binaries (both thumb or arm).<br>
<br>
Greetings,<br>
<br>
Johan<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>