[Top] [All Lists]

Re: Globals not getting initialized

To: "Ralf Baechle" <>
Subject: Re: Globals not getting initialized
From: "Bradley D. LaRonde" <>
Date: Thu, 22 Jul 1999 20:49:24 -0400
Cc: <>, <>
>> OK, I just checked the program headers for the executable.  There are
>> multiple segments in the executable:  three in the one that works, and
>> 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
>> 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
>> 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?


>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


OK.  Now that that problem is fixed...

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

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


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