lodsl; jmp *(%eax) worked!

This commit is contained in:
Koichi Nakamura 2020-12-28 23:58:07 +09:00
parent b88eec6440
commit 8486ba56a7

View file

@ -6,15 +6,12 @@
00000028: 3400 2000 0100 0000 e_ehsize,e_phentsize,e_phnum,e_shentsize
00000030: 0000 0000 0100 0000 e_shnum,e_shstrndx,<phdr> PT_LOAD
00000038: 0000 0000 0080 0408 p_offset,p_vaddr=0x08048000
00000040: 0000 0000 7c00 0000 p_paddr,p_filesz
00000040: 0000 0000 8800 0000 p_paddr,p_filesz
00000048: 0000 0008 0700 0000 p_memsz(128MB),PF_X|PF_W|PF_R
00000050: 0010 0000 0000 0000 p_align, <segment>(54: here)
00000058: 0000 0000 0000 0000 (58: latest) <the interpreter>(5c: key)
00000058: 0000 0000 7880 0408 (58: latest) <interpreter>(5c: key)
00000060: 0000 0000 0000 0000 (60: find) (64: execute)
00000068: 0000 0000 f0ff ffff (68: jump) (6c: -16)
00000070: bb00 0000 00b8 0100 <entrypoint>(70: mov ebx,0) (75: mov eax,SYS_EXIT)
00000078: 0000 cd80 (7a: int 0x80)
Note:
For simplicity, I place all data and programs in a single memory area
from address 0x08048000.
00000070: be5c 8004 08ad ff20 (70: movl $interpreter,%esi) (75: lodsl) (76: jmp *(%eax))
00000078: 7c80 0408 bb00 0000
00000080: 00b8 0100 0000 cd80