From 8486ba56a748a173fc4e99f095bac0a33436de4b Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Mon, 28 Dec 2020 23:58:07 +0900 Subject: [PATCH] lodsl; jmp *(%eax) worked! --- planck.xxd | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/planck.xxd b/planck.xxd index 7a7aa56..35c7b9c 100644 --- a/planck.xxd +++ b/planck.xxd @@ -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, 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, (54: here) -00000058: 0000 0000 0000 0000 (58: latest) (5c: key) +00000058: 0000 0000 7880 0408 (58: latest) (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 (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