*BSD News Article 94524


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!news.mathworks.com!news1.best.com!nntp1.ba.best.com!not-for-mail
From: dillon@flea.best.net (Matt Dillon)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: objdump disasm on kernel -- not working
Date: 25 Apr 1997 15:21:44 -0700
Organization: BEST Internet Communications, Inc.
Lines: 35
Message-ID: <5jrapo$6t3@flea.best.net>
References: <336120DD.5DC51F25@ipsilon.com>
NNTP-Posting-Host: flea.best.net
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39804


:In article <336120DD.5DC51F25@ipsilon.com>,
:Kevin Hayes  <kevin@ipsilon.com> wrote:
:>This is a multi-part message in MIME format.
:>
:>--------------6B5359081DDC1EAB7809B8FA
:...
:>
:>$ objdump -d kernel | head
:>
:>kernel:     file format a.out-i386-freebsd
:>
:>Disassembly of section .text:
:>00000000 <_btext-f0100000> movw   $0x1234,0x472
:>00000009 <_btext-f00ffff7> pushl  %ebp
:>0000000a <_btext-f00ffff6> movl   %esp,%ebp
:>0000000c <_btext-f00ffff4> pushl  $0x2
:>0000000e <_btext-f00ffff2> popf   
:>0000000f <_btext-f00ffff1> movw   %ds,%ax
:>
:>And we all know that the initial routine should be _start.  :-)
:>Why the btext???

    The bootloader just starts execution at the load address.  It
    has no concept of 'start'.

    btext is just the global symbol that the startup assembly
    uses... probably historical, because the machine-dependant
    code uses it (and other linker symbols) to calculate relocation
    and other information.

					-Matt

:>Kevin Hayes                |  I am Pentium, of Borg.
:>Ipsilon Networks           |  Division is futile.
:..