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

Re: Globals not getting initialized

To: "Ralf Baechle" <ralf@uni-koblenz.de>
Subject: Re: Globals not getting initialized
From: "Bradley D. LaRonde" <brad@ltc.com>
Date: Wed, 21 Jul 1999 20:57:02 -0400
Cc: <linuxce-devel@linuxce.org>, <linux-mips@fnet.fr>
OK, I just checked the program headers for the executable.  There are
multiple segments in the executable:  three in the one that works, and two
in the one that doesn't.  In the one that works, the last segment does
include my global variable initialization, but it's not there in the one
that doesn't.  Oddly enough, though, the data is in the executable, but just
not in a loadable segment.

So, in summary, it appears that the linker is putting my global
initialization data into the executable, but not including it a loadable
segment in the program headers, so the bootloader isn't loading it, and it
has something to do with ld.script.little.

Regards,
Brad


-----Original Message-----
From: Ralf Baechle <ralf@uni-koblenz.de>
To: Bradley D. LaRonde <brad@ltc.com>
Cc: linuxce-devel@linuxce.org <linuxce-devel@linuxce.org>;
linux-mips@fnet.fr <linux-mips@fnet.fr>
Date: Wednesday, July 21, 1999 8:54 PM
Subject: Re: Globals not getting initialized


>On Wed, Jul 21, 1999 at 08:01:01PM -0400, Bradley D. LaRonde wrote:
>
>> It's funny, because they do get initialized properly when I link with the
>> NetBSD (stand.ldscript) linker script, but not when I link with the
>> Linux-MIPS linker script (ld.script.little).  It appears that something
in
>> ld.script.llittle is throwing the bootloader (pbsdboot) off.
>
>Maybe you're accidently loading only the first ELF segment or so?
>
>(I'm not shure if an ELF kernel binary usually has multiple segments but
>it's a theory worth to be verified.)
>
>  Ralf

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