>"Bradley D. LaRonde" wrote:
>>
>> 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.
>
>No, it has something to do with your bootloader. Perhaps, you bootloader
>can deal with only first segment of an ELF executable. So, either fix
>your bootloader or arrange everything into first segment. BTW,
>bootloader in my box loads only first segment too, so I had to implement
>my own small bootloader that is appended before the kernel and sets the
>data and bss segments ar run-time. It's located in
>arch/mips/baget/balo*.
Actually the bootloader that I'm using (pbsdboot) DOES load all the
segments. I've checked the code, and it's coded that way, plus I've checked
a sample app that has init data in the second loadable segment and it gets
inited properly. I don't think the problem is in the bootloader - I now
think it is probably combination of elements from head.S, other symbols and
sections, and ld.script.little.
Regards,
Brad
Regards,
Brad
|