Everything

-rom


< Optimizing Linkage Editor (rlink) Options / Output Options >

[Format]

-rom = <suboption>[,...]
       <suboption>:  <ROM section name>=<RAM section name>

[Description]

-

Reserves ROM and RAM areas in the initialized data area and relocates a defined symbol in the ROM section with the specified address in the RAM section.

-

Specifies a relocatable section including the initial value for the ROM section.

-

Specifies a nonexistent section or relocatable section whose size is 0 for the RAM section.

-

A wildcard symbol (*) can be used in ROM and RAM section names. [V3.06.00 or later]

-

If the name of a relocatable ROM section with the initial value matches the wildcard expression of the ROM section name, the name is processed as a RAM section name. At this time, a wildcard symbol (*) in the RAM section name is replaced with the part that matches the wildcard symbol (*) in the ROM section name.

Example

When there are three ROM sections (D, D_1, and D_2) and -rom=D*=R* is specified, three RAM sections (R, R_1, and R_2) are generated.

Note

The RAM section name 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=D*=R*       # No problem
-rom=D*=*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.

[Examples]

rom=D=R
start=D/100,R/8000

-

Reserves R section with the same size as D section and relocates defined symbols in D section with the R section addresses.

[Remarks]

-

When form={object | relocate | library}or strip is specified, this option is unavailable.