Note, however that the ldmia instruction for the epilogue is missing the !, hence although the value of sp is incremented after the load of the other registers from the stack, it is not written back! The instruction does however, modify sp since it is one of the registers being popped from the stack. The mnemonic here is quite confusing!
Stalker for ARM had a defect whereby it would incorrectly modify the sp when executing such an instruction.
Inspecting binaries generated with an old compiler (gcc 4.7.1), we can observer the following prologue...
And the corresponding epilogue...
Note, however that the
ldmia
instruction for the epilogue is missing the!
, hence although the value ofsp
is incremented after the load of the other registers from the stack, it is not written back! The instruction does however, modifysp
since it is one of the registers being popped from the stack. The mnemonic here is quite confusing!Stalker for ARM had a defect whereby it would incorrectly modify the
sp
when executing such an instruction.