Returns the address of the named section or memory segment.
ADDR (sectionName | segmentName)
sectionName
Identifier for a file section.
segmentName
Identifier for a memory segment
The code of ADDR() Function uses the ADDR function to assign the address of ROOT to the symbol __rootbasecode .
MEMORY{
ROOT : origin = 0x80000400, length = 0
}
SECTIONS{
.code :
{
__rootbasecode = ADDR(ROOT);
*.(text);
} > ROOT
}