I have no idea why the following code hits a BAD_INSTRUCTION
error, anyone?
mov r4, r0
movw r0, #0xc70 ; injected code start here
movt r0, #0x8bb3
movw r3, #0x576
ldr r1, [r7]
movs r5, #0x1a
add r5, pc ; next instruction will jump over 9 instructions
bx r5 ; injected code end here
ldr r1, [r0]
ldr r0, [r2]
blx 0x26e11c
movw r1, #0x6442
movt r1, #0x18
add r1, pc
ldr r1, [r1]
blx 0x26e11c
mov r3, r1
movw r1, #0x66a4 ; r1 has not been loaded
movt r1, #0x15 ; with new value. Why?
mov r2, r0
add r1, pc ; This instruction isn't getting called
mov r0, r4 ; EXC_BAD_INSTRUCTION here
blx __sprintf