Forum Discussion
Altera_Forum
Honored Contributor
20 years ago --- Quote Start --- originally posted by bkucera@Dec 20 2005, 04:39 PM so how does the .bss section get allocated in memory if the sections that refer to it in the elf file don't make it into the .flash file?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11677)
--- quote end ---
--- Quote End --- smcnutt, you're really good at these so please correct me if I'm wrong!.... I think the .elf just leaves this... blank. Again, crt0 has to know where the bss is to initialize it. The linker provides these as global symbols that crt0 has access to. The .elf file itself does not contain data for the entire system memory map.. there are address/data 'records' defining what should be initialized and where. The boot loader source code reads data out of flash, extracting address/data pairs as it goes. The result of this should be that the bss section of ram is not written over by the boot loader at all; again crt0 will initialize it.