User`s guide
ELF Linker and Command Language
Linker Command File Keyword Listing
299Targeting MC56F83xx/DSP5685x Controllers
Example
.data :
{
*(.data)
*(.bss)
FSTART_ = .;
. = FSTART_ + 0x1000;
__end = .;
} > DATA
ADDR
The ADDR function returns the address of the named section or memory segment.
Prototype
ADDR (sectionName | segmentName | symbol)
In the example below, ADDR is used to assign the address of ROOT to the symbol
__rootbasecode.
Example
MEMORY{
ROOT (RWX) : ORIGIN = 0x8000, LENGTH = 0
}
SECTIONS{
.code :
{
__rootbasecode = ADDR(ROOT);
*(.text);
} > ROOT
}