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 the following listing uses the ADDR function to assign the address of ROOT to the symbol __rootbasecode.
MEMORY{ ROOT (RWX) : ORIGIN = 0x80000400, LENGTH = 0 } SECTIONS{ .code : { __rootbasecode = ADDR(ROOT); *.(text); } > ROOT }