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.
I assume sbss and ebss stand for start bss and end bss. Why do they need to be there?
My second question is that why we need a linker script in the first place? Isn't ELF a common format? Should ld be able to link it without us writing our own script?
In general, .bss is used for global variables, but it is not included in executable. `sbss` and `ebss` are there so you can "create" it in memory (for example, move something that was right after executable on disk, zero it or whatever you want).
Personally, since I have recently hit a problem with it, I just put `*(.bss)` in `.data`, so I don't have to worry about it.
As for the "why linker script" question - there might be a chance that ld will get it just right without it, but since in OSDev what you need and what you seek is *control* over what's happening - and linker script gives you that.
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations