Relocatable Code Sections are placed in the DEFAULT_ROM or .text Segment.
Relocatable Data Sections are placed in the DEFAULT_RAM or .data Segment.
There are no checks at all that variables are in RAM. If you mix code and data in a section you cannot place the section into ROM. That is why we suggest that you separate code and data into different sections.
If you want to place a section in a specific address range, you have to put the section name in the placement portion of the linker parameter file, as listed in the following listing:
SECTIONS ROM1 = READ_ONLY 0x0200 TO 0x0FFF; SpecialROM = READ_ONLY 0x8000 TO 0x8FFF; RAM = READ_WRITE 0x4000 TO 0x4FFF; PLACEMENT DEFAULT_ROM INTO ROM1; mySection INTO SpecialROM; DEFAULT_RAM INTO RAM; END