linux-mips-fnet
[Top] [All Lists]

Re: Globals not getting initialized

To: "Bradley D. LaRonde" <brad@ltc.com>
Subject: Re: Globals not getting initialized
From: Ralf Baechle <ralf@uni-koblenz.de>
Date: Thu, 22 Jul 1999 01:16:52 +0200
Cc: linuxce-devel@linuxce.org, linux-mips@fnet.fr
In-reply-to: <018801bed3ca$6dfcef60$b1119526@tecra.ltc.com>; from Bradley D. LaRonde on Wed, Jul 21, 1999 at 06:43:19PM -0400
References: <018801bed3ca$6dfcef60$b1119526@tecra.ltc.com>
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 global
> 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 the
> 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?  My
> next stop is looking in there to see if I can figure out what is happening.

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 ...

  Ralf

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