From owner-freebsd-hackers Sun Mar 12 04:10:40 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id EAA14777 for hackers-outgoing; Sun, 12 Mar 1995 04:10:40 -0800 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id EAA14742 for ; Sun, 12 Mar 1995 04:10:29 -0800 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id WAA11049; Sun, 12 Mar 1995 22:07:49 +1000 Date: Sun, 12 Mar 1995 22:07:49 +1000 From: Bruce Evans Message-Id: <199503121207.WAA11049@godzilla.zeta.org.au> To: bde@zeta.org.au, hackers@FreeBSD.org, hasty@netcom.com Subject: Re: text's start address? Sender: hackers-owner@FreeBSD.org Precedence: bulk >(mdos reads header of mdos.mon) >gdb mdos >... >Breakpoint 1, main (argc=1, argv=0xefbfd978) at mdos.c:176 >176 asm volatile("movl %1, %%esp; jmp %2" : >(gdb) print ex >$3 = {a_magic = 267, a_text = 36864, a_data = 8192, a_bss = 9540, > a_syms = 4140, a_entry = 24, a_trsize = 0, a_drsize = 0} >a_entry appears to have a low value 0x18. >... >(gdb) x/i main >0x578
: pushl %ebp >So it appears that for me to get to main the actual address is >0x1578. Now the question is how can I arrive at this number >from the data structure ex? Execution starts at 0x18, not at _main. 0x18 is in the data structure. Bruce