ROMADDR

Equivalent to ADDR. Returns ROM address.

ROMADDR (sectionName | segmentName)
  
Parameters

sectionName

Identifier for a file section.

segmentName

Identifier for a memory segment

Example

The code of ROMADDR() Function uses the ROMADDR function to assign the address of ROM to the symbol __rootbasecode .

Listing 1. ROMADDR() Function
MEMORY{
    ROM : origin = 0x80000400, length = 0

}



SECTIONS{

  .code :

  {

  __rootbasecode = ROMADDR(ROM);

     *.(text);

  } > ROM



}