[Top] [All Lists]

Re: Globals not getting initialized

To: <>, <>
Subject: Re: Globals not getting initialized
From: "Bradley D. LaRonde" <>
Date: Wed, 21 Jul 1999 19:16:11 -0400
>On Wed, Jul 21, 1999 at 06:43:19PM -0400, Bradley D. LaRonde wrote:
>> My global variables aren't getting initialized.  For example, at the
>> scope:
>>     int a[] = {1, 2, 3};
>> a[] does not get initialized with {1, 2, 3}.  The symbol is there, but it
>> doesn't copy the initial data into the space.
>> The problem has something to do with the linker script, because if I use
>> NetBSD linker script instead of the arch/mips/ld.script.little linker
>> script, my globals get initialized properly.  Any ideas what might be
>> causing this?  I've compared the two scripts and I haven't figured it out
>> yet.  Is the bootloader responsible for initializing global variables?
>> next stop is looking in there to see if I can figure out what is
>Globals are getting initialized properly, so this must be some messup
>on your side, sorry.  Globals not getting initialized is equivalent with
>the kernel not working ...

I'm porting the kernel to a Vadem Clio (Vr4111), and this is happening in
the init part of the kernel, before start_kernel.

I also duplicated it in a small test app.  I'm pretty sure they are not
getting initialized.

So who initializes globals?  The bootloader?


<Prev in Thread] Current Thread [Next in Thread>