Difference between revisions of "Talk:Kernel Syscalls"

From The iPhone Wiki
Jump to: navigation, search
(Created page with "i dont know if its right, pls correct me if im wrong :) --~~~~")
 
(Making sense of what i0nic tweets)
Line 1: Line 1:
 
i dont know if its right, pls correct me if im wrong :) --[[User:Zmaster|Zmaster]] 13:58, 29 November 2011 (MST)
 
i dont know if its right, pls correct me if im wrong :) --[[User:Zmaster|Zmaster]] 13:58, 29 November 2011 (MST)
  +
  +
HTTP/i0nic:
  +
The following is hardly "bogus".
  +
0x30d2ad54 <chown>: mov r12, #16 ; 0x10, being # of chown
  +
0x30d2ad58 <chown+4>: svc 0x00000080
  +
is a direct disassembly of libSystem. You can see that with gdb on a jb device.
  +
  +
SVC is an ARM instruction to invoke a "supervisor call". The 0x80 is the call #, because the chip allows an interrupt vector, much like Intel's INT instruction. Then, you place the syscall # (in the above example, chown) in r12.

Revision as of 01:00, 2 March 2012

i dont know if its right, pls correct me if im wrong :) --Zmaster 13:58, 29 November 2011 (MST)

HTTP/i0nic: The following is hardly "bogus". 0x30d2ad54 <chown>: mov r12, #16  ; 0x10, being # of chown 0x30d2ad58 <chown+4>: svc 0x00000080 is a direct disassembly of libSystem. You can see that with gdb on a jb device.

SVC is an ARM instruction to invoke a "supervisor call". The 0x80 is the call #, because the chip allows an interrupt vector, much like Intel's INT instruction. Then, you place the syscall # (in the above example, chown) in r12.