[Top] [All Lists]

Globals not getting initialized

To: <>, <>
Subject: Globals not getting initialized
From: "Bradley D. LaRonde" <>
Date: Wed, 21 Jul 1999 18:43:19 -0400
My global variables aren't getting initialized.  For example, at the global

    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.


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