home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- From: jes@grendel.demon.co.uk (Jim Segrave)
- Path: sparky!uunet!pipex!demon!grendel.demon.co.uk!jes
- Subject: Re: IMPORTANT [BUG in 0.99] Re: [ANNOUNCE]: linux version 0.99
- Keywords: kernel linux 0.99
- References: <1992Dec14.192204.16359@klaava.Helsinki.FI> <1992Dec19.193230.282@grendel.demon.co.uk> <1992Dec19.222324.22106@klaava.Helsinki.FI>
- Organization: Segrave Software Services
- Date: Sun, 20 Dec 1992 20:41:14 +0000
- Message-ID: <1992Dec20.204114.147@grendel.demon.co.uk>
- Sender: usenet@demon.co.uk
- Lines: 27
-
- In article <1992Dec19.222324.22106@klaava.Helsinki.FI> wirzeniu@klaava.Helsinki.FI (Lars Wirzenius) writes:
- >In normal C programs, yes, but the kernel is a bit special. Like, for
- >instance, who is going to do the initialization? Normally it is the
- >kernel (which zeroes out all memory before it is given to a user
- >process), the linker (which loads the pre-initialized variables from a
- >file, i.e. those variables which are given an explicit initializer),
- >and possbily the C startup code. Trouble is, none of these are active
- >when the kernel is booting...
-
- Hmm... Obviously data with explicit initialisers is getting loaded from the
- kernel image (I'm sure gcc doesn't generate startup code to individually
- initialise static data). And I assume that the size of the kernel - code,
- initialised data, and uninitialised statics is available at the a.out
- stage. Shouldn't there be some way for setup.S to determine the size of
- the uninitialised data area and have it zero this out (which is adequate,
- since gcc's version of a NULL pointer is all bits zero)?
-
- It's not a major issue, but if you're used to programming in C, I think
- you may tend to assume that all statics are set to the apporpriate form
- of zero, so I could see kernel hackers getting caught on this more than
- once in the future. I just sort of assumed that the kernel did some
- sort of a memset to the end of it's data area when it loaded, hence my
- query.
-
- --
- Jim Segrave - Segrave Software Services (jes@grendel.demon.co.uk)
-
-