Is it safe to put page map just after bss section?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
torshie
Member
Member
Posts: 89
Joined: Sun Jan 11, 2009 7:41 pm

Is it safe to put page map just after bss section?

Post by torshie »

Physical memory layout of my kernel is like this:
0 - 1M: unused
1M - 1.5M: kernel stack
1.5M - 4M: code & data section
4M - $bssEnd: BSS section. $bssEnd is from ld script, $bssEnd is 4k aligned.
$bssEnd - xxx: page map.

Is it safe to put page map there? Will the code generated by G++ put anything, for example: local static objects, after the BSS section at runtime?

btw: my kernel runs in 64-bit mode
User avatar
kop99
Member
Member
Posts: 120
Joined: Fri May 15, 2009 2:58 am

Re: Is it safe to put page map just after bss section?

Post by kop99 »

Hi, torshie.
Is it safe to put page map there? Will the code generated by G++ put anything, for example: local static objects, after the BSS section at runtime?
It's safe. All of you code will place in code and data section. Don't worry about that!
Post Reply