For the MSP430 it is possible to select the MPU architecture. The flag ‘-m [mpu type]’ will select an appropriate linker script for selected MPU type. (To get a list of known MPUs just pass ‘-m help’ option to the linker).
The linker will recognize some extra sections which are MSP430 specific:
Defines a portion of ROM where interrupt vectors located.
Defines the bootloader portion of the ROM (if applicable). Any code in this section will be uploaded to the MPU.
Defines an information memory section (if applicable). Any code in this section will be uploaded to the MPU.
This is the same as the ‘.infomem’ section except that any code in this section will not be uploaded to the MPU.
Denotes a portion of RAM located above ‘.bss’ section.
The last two sections are used by gcc.
This will transform .text* sections to [either,lower,upper].text* sections. The argument passed to GCC for -mcode-region is propagated to the linker using this option.
This will transform .data*, .bss* and .rodata* sections to [either,lower,upper].[data,bss,rodata]* sections. The argument passed to GCC for -mdata-region is propagated to the linker using this option.
Prevent the transformation of sections as specified by the
This is useful if you are compiling and linking using a single call to the GCC
wrapper, and want to compile the source files using -m[code,data]-region but
not transform the sections for prebuilt libraries and objects.