linking the kernel: Where are my variables?
Posted: Fri Aug 15, 2003 4:13 pm
This is now my third loosely related question to memory management. Thanks for the quick help on the other posts!
This question is pretty quick to ask in comparison:
In my kernel, if I go something like:
int x; vid.writeln((unsigned long)&x)
I invariably get a number around 0x1000 which is confusing - I have 3 sections in my linker script, text (loaded at 0xc0000000), data, which according to a symbol I defined inside it, is loaded shortly after, and bss, which again is loaded just after that again. Obviously this isn't good when it comes to multitasking - I'd really prefer all the kernel data to be above the 3GB mark. I've read the ld manual, and I'm sure the link.ld file I use is ok. So can anyone suggest what I can look at to try and fix this?
Thanks!
This question is pretty quick to ask in comparison:
In my kernel, if I go something like:
int x; vid.writeln((unsigned long)&x)
I invariably get a number around 0x1000 which is confusing - I have 3 sections in my linker script, text (loaded at 0xc0000000), data, which according to a symbol I defined inside it, is loaded shortly after, and bss, which again is loaded just after that again. Obviously this isn't good when it comes to multitasking - I'd really prefer all the kernel data to be above the 3GB mark. I've read the ld manual, and I'm sure the link.ld file I use is ok. So can anyone suggest what I can look at to try and fix this?
Thanks!