[llvm-dev] llvm-bjdump and ELF-ARM/Thumb

Bruce Hoult via llvm-dev llvm-dev at lists.llvm.org
Sun Jun 19 06:03:13 PDT 2016


What happens if you use the standard bunutils objdump e.g. from macports
package arm-elf-binutils (if you're on a Mac)?


On Mon, Jun 20, 2016 at 12:45 AM, Johan Wehrli via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi Everyone,
>
> When I used llvm-objdump to disassemble an ELF armv7 or thumb I have this
> error message:
>
> llvm-objdump: warning: invalid instruction encoding
>
> This message appears directly into the output and the output is mostly
> wrong (the invalid instruction create a shift in the addresses) :
>
>
>     1a6d:       ff 2f e1 08     stmeq   r1!, {r0, r1, r2, r3, r4, r5, r6,
> r7, r8, r9, r10, r11, sp} ^
>     1a71:       30 90 e5 00     rsceq   r9, r5, r0, lsr r0
>     1a75:       10 a0 e1 00     rsceq   r10, r1, r0, lsl r0
>     1a79:       00 53 e3 1e     cdpne   p3, #14, c5, c3, c0, #0
> llvm-objdump: warning: invalid instruction encoding
>     1a7e:       2f 01 01 00     andeq   r0, r1, pc, lsr #2
> llvm-objdump: warning: invalid instruction encoding
>     1a83:       e3 13 ff 2f     svchs   #16716771
> llvm-objdump: warning: invalid instruction encoding
>
> The binaries I try to read are c++ dynamic libraries for Android.
>
> I have used the following parameters:
>
> -llvm-objcdump mylib.so -d -arch=arm
> -llvm-objcdump mylib.so -d -arch=armv7
> -llvm-objcdump mylib.so -d -arch=thumb
>
> or with the following triples:
>
> armv7-none-linux-android
> thumbv7-none-linux-android
>
> Does anyone know why I have this error? Am I missing some input parameters?
>
> This is strange because it works great on iOS binaries (both thumb or arm).
>
> Greetings,
>
> Johan
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160620/9c5f3330/attachment.html>


More information about the llvm-dev mailing list