From 754f10f0b00555a7d1cc8ffed98ad66ddd63cb51 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Mon, 12 Jul 2004 23:26:42 +0000 Subject: [PATCH] update Example from linux kernel debuggin committer: jreiser 1089674802 +0000 --- src/p_vmlinx.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/p_vmlinx.cpp b/src/p_vmlinx.cpp index 64c4c8b8..67672e52 100644 --- a/src/p_vmlinx.cpp +++ b/src/p_vmlinx.cpp @@ -429,11 +429,17 @@ void PackVmlinuxI386::unpack(OutputFile *fo) //#include // // .text -//startup_32: .globl startup_32 -// pushl $0; popf # subsumes "cli; cld"; also clears NT for buggy BIOS +//startup_32: .globl startup_32 # In: %esi=0x90000 +// cli # but if it matters, then there is a race! // -// pushl $ __BOOT_DS; pop %ds # %ds= __BOOT_DS -// push %ds; pop %es # %es= __BOOT_DS +// movl $ __BOOT_DS,%eax # flat addressing, please +// movl %eax,%ss; movl %esi,%esp +// movl %eax,%ds +// movl %eax,%es +// movl %eax,%fs +// movl %eax,%gs +// +// pushl $0; popf # subsumes "cli; cld"; also clears NT for buggy BIOS // // movl $ startup_32,%eax # base address of uncompressed execution // pushl $ __BOOT_CS