This option specifies the section that maps symbols from ROM to RAM.
This option reserves ROM and RAM areas in the initialized data area and relocates defined symbols in the ROM section with the address in the RAM section. |
If the name of a relocatable ROM section with the initial value matches the wildcard expression of ROMsection, the name is processed as a RAM section name. At this time, a wildcard symbol (*) in RAMsection is replaced with the part that matches the wildcard symbol (*) in the ROM section name. |
When there are four ROM sections (.data, .data_1, .sdata, and .sdata_1) and -rom=*data*=*data*_R is specified, four RAM sections (.data_R, .data_1_R, .sdata_R, and .sdata_1_R) are generated. |
The RAM section names after replacement must be handled appropriately by using, for example, the -start option. |
Multiple wildcard symbols (*) can be specified. The number of wildcard symbols must match between ROMsection and RAMsection. |
-rom=.data*=.data*_R # No problem -rom=.data*=.data*_R_* # Error due to too many wildcard symbols in RAMsection |
If a section having the same name as the one generated by replacement already exists, an error occurs. |
To reserve the .data.R section with the same size as the .data section and relocate defined symbols in the .data section with address in the .data.R section, describe as: |