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: Thu, 22 Jul 1999 20:49:24 -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.
>
>The flags (load, allocate etc.) for a new section are set by the first
>input section going into that output section.  So maybe you're linking
>some section with weird settings as the frist one into .data?


Nope...



>Oh, you're not getting trapped by the -N linker option bug?  Don't pass
>it to ld or you'll get a bad kernel binary.  I haven't yet tracked down
>why.


Hehehe...

OK.  Now that that problem is fixed...

In case you missed the subtlety, I'll say it right out - yup, it was the -N
bug.

Well, now that I'm an expert on this bug, need any help fixing it?  :)

Anyway, thank you for your help.  Now on to the real stuff (hopefully).


Regards,
Brad

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