I tried to write my version of malloc(), and found out that .heap overlaps with .bss.
My present understanding of things is, that .heap section is presently generated somewhere in the cavernous darkness of the linker itself. I also see that the linker scripts are written so that they provide __heap_start symbol at the end of .noinit section, presumably as a fix for this.
But, is there any deeper reason for this? Isn't the proper way of things to generate the .heap section, and link the __heap_start symbol to its beginning (even if it would be the same physical location, right after .noinit)?
Am I missing something obvious?