Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jun 2000 03:57:42 -0700
From:      Peter Wemm <peter@netplex.com.au>
To:        Greg Lehey <grog@lemis.com>
Cc:        Bruce Evans <bde@zeta.org.au>, Bruce Evans <bde@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: Booting debug kernels (was: cvs commit: src/sys/i386/i386 locore.s) 
Message-ID:  <20000610105742.7BCE31CE1@overcee.netplex.com.au>
In-Reply-To: Message from Greg Lehey <grog@lemis.com>  of "Sat, 10 Jun 2000 09:59:25 %2B0930." <20000610095925.A81647@wantadilla.lemis.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Greg Lehey wrote:
> On Friday,  9 June 2000 at 19:54:19 +1000, Bruce Evans wrote:
> > On Fri, 9 Jun 2000, Greg Lehey wrote:
> >
> >> On Thursday,  8 June 2000 at 10:53:44 -0700, Bruce Evans wrote:
> >>> bde         2000/06/08 10:53:43 PDT
> >>>
> >>>   Modified files:
> >>>     sys/i386/i386        locore.s
> >>>   Log:
> >>>   Always include the full symbol table (as specified by its start and
> >>>   end values in bootinfo) in kernel space if it is loaded (i.e., if its
> >>>   specified end address is nonzero), not just if it is loaded and DDB
> >>>   is configured.  This may be used to fix kldsym(2) for booting without
> >
> >> I think this is worth a HEADS UP, or at least a mention in UPDATING.
> >
> > I disagree.  This only affects broken configurations.
> 
> This is an unsubstantiated claim.  Even if you were to substantiate
> it, it doesn't alter the fact that a lot of people have taken notice
> of the fact that you can now boot from a debug kernel and not suffer
> the bloat of the symbol table.  If we change that, we should draw it
> to people's attention.

That is irrelevant.  ELF keeps it's debug info seperate from the symbol
table - *that* is why we can boot a debug kernel without any size side
effects.

All that Bruce has changed is that when you bypass loader(8) and boot from
boot2 directly, any unstripped symbol table (NOT debug symbols) are
preserved so that vmstat(8) etc can see static symbols.

On it's own, this change does nothing.  It just prevents the symbol table
being nuked in the !DDB case when using boot2 directly.

> >> Is there any way to boot such a kernel and discard the symbols?
> >
> > Not at boot time.  Use strip(1) to strip unwanted symbols.  The symbol
> > table has become very bloated even for non-deubugging kernels, but
> > boot time is not the time to reduce it.
> 
> I think what you're trying to say here is "it's too difficult to do at
> boot time", but it's difficult to tell.  Maybe you're trying to say "I
> don't know what use this could be", but then there are obvious
> advantages to having this choice at this time, and I can't see that it
> can be that difficult if you've been able to change the behaviour in a
> total of 8 lines of assembler.

I think you are misunderstanding. This only affects booting directly via
boot2 and not the normal way using loader(8).

loader sets bootinfo.bi_kernend, which overrides the bump of the end
of kernel space, so the section of code bde changed is unaffected here.
(boot2 does not set bi_kernend, so it's rather important in that case).

Nothing (in the tree) except db_aout.c looks at bi_symtab,bi_esymtab at
present.  Also note that a.out kernel builds are utterly impossible now
that we depend on the new binutils bugfixes, so db_aout.c is even more
irrelevant.

> Greg

Cheers,
-Peter




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000610105742.7BCE31CE1>