Everything

 

-ROm


This option specifies the section that maps symbols from ROM to RAM.

[Specification format]

-ROm=ROMsection=RAMsection[,ROMsection=RAMsection]...

 

-

Interpretation when omitted

None

[Detailed description]

-

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.

-

Specify a relocatable section including the initial value for ROM section ROMsection.

-

Specify a nonexistent section or relocatable section whose size is 0 for RAM section RAMsection.

-

A wildcard symbol (*) can be used in ROMsection and RAMsection. [V2.06.00 or later]

-

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.

Example

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.

Note

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.

Example

-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.

[Example of use]

-

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:

>rlink a.obj b.obj -rom=.data=.data.R -start=.data/100,.data.R/8000

[Remark]

-

If the -form={object|relocate|library} option or -strip option is specified, this option will be invalid.