ADDR

Returns the address of the named section or memory segment.

ADDR (sectionName | segmentName)
  
Parameters

sectionName

Identifier for a file section.

segmentName

Identifier for a memory segment

Example

The code of ADDR() Function uses the ADDR function to assign the address of ROOT to the symbol __rootbasecode .

Listing 1. ADDR() Function
MEMORY{
    ROOT : origin = 0x80000400, length = 0

}



SECTIONS{

  .code :

  {

  __rootbasecode = ADDR(ROOT);

     *.(text);

  } > ROOT



}