The embedded device has two SRAM regions. First at 0x20000000 and length 16k. Then at 0x20040000 length 96k. In the application, the resulting .bss section size is 102k so it doesn't fit to either RAM region fully. It needs to be split between the two regions. How to do this is in .ld linker script?
I know two options which are kludgy.
Option A: hand pick the objects by name in the script and split those to two sections. With this option I feel like I am doing manually what the linker is supposed to do.
Option B: place attributes to source code to make some objects to special .bss2 section. This one's even worse than option A.
I want that the linker automatically optimally does split objects across the two memory regions. I know at least IAR linker does it optimally without any manual work.