I want to convert Intel x86 assembly code to ARM.
I do not know how to use the stack.
I wrote a call to execve using an int 0x80
system call for 32-bit x86 Linux.
However, ARM uses svc or swi.
But I do not know how to use something like this:
push 0x0068732f
and push 0x6e69622f
.globl main
main:
push 0x0068732f
push 0x6e69622f
mov edx, 0
mov ecx, 0
mov ebx, esp
mov eax, 11
int 0x80
mov ebx, 0
mov eax, 1
int 0x80
The syscall on arm expects to use the swi to look like this:
.global _start
_start:
?????
mov r7, #11
swi #0
_exit:
mov r7, #1
swi #0
I want to use the stack push method rather than the .ascii method.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…