Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@mandrakesoft.com>
To: Jun Sun <jsun@mvista.com>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
	Scott A McConnell <samcconn@cotw.com>,
	linux-mips@oss.sgi.com
Subject: Re: kernel/printk.c problem
Date: 18 Apr 2001 20:28:42 +0200	[thread overview]
Message-ID: <m2vgo2ysdh.fsf@trasno.mitica> (raw)
In-Reply-To: <3ADDCFAB.549DA4FA@mvista.com>

>>>>> "jun" == Jun Sun <jsun@mvista.com> writes:

jun> Geert Uytterhoeven wrote:
>> 
>> On Tue, 17 Apr 2001, Scott A McConnell wrote:
>> > struct console *console_drivers = NULL;                          <----
>> > Need the NULL.
>> >
>> > Otherwise, bad things can happen on the following statement in printk
>> >
>> > ~line 311
>> >
>> >        if ((c->flags & CON_ENABLED) && c->write){
>> 
>> Current policy is not explicitly initializing variables to zero. If this causes
>> problems, there's a bug in the routine that clears the BSS on kernel entry.
>> 

jun> Interesting.  What is the reason behind the policy?  Is that because
jun> initialized variable are put in a different section that takes more size in
jun> the image?

Yes.  In linux the BSS section (aka non explicitely initialized vars)
is initializated with 0.  The initialzed variables need to be in the
data section of the kernel image (what only adds size, nothing else).

Later, Juan.



-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

      reply	other threads:[~2001-04-18 18:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-17 22:11 kernel/printk.c problem Scott A McConnell
2001-04-18  6:53 ` Geert Uytterhoeven
2001-04-18 16:56   ` Scott A McConnell
2001-04-18 17:32   ` Jun Sun
2001-04-18 18:28     ` Juan Quintela [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2vgo2ysdh.fsf@trasno.mitica \
    --to=quintela@mandrakesoft.com \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=jsun@mvista.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=samcconn@cotw.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox