From owner-cvs-all Mon Sep 18 9:41:13 2000 Delivered-To: cvs-all@freebsd.org Received: from netplex.com.au (adsl-63-207-30-186.dsl.snfc21.pacbell.net [63.207.30.186]) by hub.freebsd.org (Postfix) with ESMTP id 10A9437B422; Mon, 18 Sep 2000 09:41:09 -0700 (PDT) Received: from netplex.com.au (peter@localhost [127.0.0.1]) by netplex.com.au (8.11.0/8.9.3) with ESMTP id e8IGf1G25853; Mon, 18 Sep 2000 09:41:01 -0700 (PDT) (envelope-from peter@netplex.com.au) Message-Id: <200009181641.e8IGf1G25853@netplex.com.au> X-Mailer: exmh version 2.1.1 10/15/1999 To: Bruce Evans Cc: Matthew Jacob , "Matthew N. Dodd" , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern subr_bus.c In-Reply-To: Date: Mon, 18 Sep 2000 09:41:01 -0700 From: Peter Wemm Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bruce Evans wrote: > On Mon, 18 Sep 2000, Matthew Jacob wrote: > > > Yeah, I wondered about that too. I thought > > > > int foo; > > > > and > > > > int foo=0; > > > > were supposed to be the same. Is the kernel now forgetting to clear bss? > > Same for the C abstract machine, which we mostly depend on in the > kernel (although the kernel is not entirely implementable in C). Of > course, it is an implementation detail that the explicit initialization > puts the variable in the data section instead of in the bss, at least > for gcc on i386's. > > The bss clearing code hasn't changed for years on i386's. I can't see > where the bss is cleared on alphas (alpha_init is called very early > in locore.s). BSS is pre-zeroed by the loader. src/sys/boot/common/load_elf.c and load_aout.c Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message