r0 - first argument
r1 - second argument
r2 - third argument
r3 - fourth argument
[sp, #0] - fifth argument
[sp, #4] - 6-th argument
[sp, #8] - 7-th argument
[sp, #12] - 8-th argument
func(1,2,3,4,5,6,7,8)을 콜했을때의 objdump 내용:
000083e0 <main>: 83e0: b580 push {r7, lr} 83e2: b084 sub sp, #16 83e4: af04 add r7, sp, #16 83e6: 2305 movs r3, #5 83e8: 9300 str r3, [sp, #0] 83ea: 2306 movs r3, #6 83ec: 9301 str r3, [sp, #4] 83ee: 2307 movs r3, #7 83f0: 9302 str r3, [sp, #8] 83f2: 2308 movs r3, #8 83f4: 9303 str r3, [sp, #12] 83f6: 2001 movs r0, #1 83f8: 2102 movs r1, #2 83fa: 2203 movs r2, #3 83fc: 2304 movs r3, #4 83fe: f7ff ffe1 bl 83c4 <func> 8402: 4618 mov r0, r3 8404: 46bd mov sp, r7 8406: bd80 pop {r7, pc} |
'Computer Security > Reversing' 카테고리의 다른 글
IDA pro ARM <-> Thumb Switch (1) | 2013.11.17 |
---|---|
ELF-64bit 에서 argument 전달방식 (2) | 2013.10.24 |
카톡킨상태로 올리디버거 사용하기 (4) | 2013.07.02 |