Quickies

[categories] [index] [all (531)] [latest]

iOS
  1. $ echo "0x28 0x46" | llvm-mc --disassemble -triple=thumbv7
        .text
        mov r0, r5
    
    $ echo "mov r0, r5" | llvm-mc -assemble -triple=thumbv7 -show-encoding
        .text
        mov r0, r5                  @ encoding: [0x28,0x46]
    
    $ echo "movs r0, 0x1" | llvm-mc -assemble -triple=thumbv7 -show-encoding
        .text
        movs    r0, #1                  @ encoding: [0x01,0x20]
    

    See also iOS binary patching: http://www.zdziarski.com/blog/?p=2172