If an uninitialized variable uses __attribute__ with section, the variable is treated like an initialized variable. This causes these variables to not end up in the .bss but instead in the data which goes in the flash.
You can check this AN to understand the structure of Linker scripts page#25, section "Modify the linker script file" :
For example if you initialize like this in your code:
You can do the following in the linker script
.MB_section 0x20000100 (NOLOAD) :
. = ALIGN(4);
You can use the NOLOAD type on the section to specify that this section is not supposed to be loaded. Note that this will only reserve that space in the RAM. If the variables need to be initialized that can be done in the main().
I sort of understand what this does - I never took the time to understand linker scripts.
My initial test with just adding the memory section did compile, but did not put the lineBuffer at the correct address. (range).
I can see in my .map file it is now correct after making your suggested adjustments.
.ramhi 0x20000000 0x50
0x20000000 . = ALIGN (0x4)
.ramhi 0x20000000 0x50 .\CortexM3\ARM_GCC_541\Debug\main.o