10.3.4.1 Output Section .reset
Section .reset contains a GOTO
instruction, created at link time, from output section data commands:
/*
** Reset Instruction
*/
.reset __RESET_BASE :
{
SHORT(ABSOLUTE(__reset));
SHORT(0x04);
SHORT((ABSOLUTE(__reset) >> 16) & 0x7F);
SHORT(0);
} >reset
Each SHORT()
data command causes a 2
byte value to be included. There are two expressions which include the symbol __reset
, which by convention is the first function invoked
after a device reset. Each expression calculates a portion of the address of the Reset
function. These declarations encode a GOTO
instruction,
which is two instruction words long.
The ABSOLUTE()
function specifies the final value of a program symbol after linking. If this function were omitted, a relative (before-linking) value of the program symbol would be used.
The >reset
portion of this definition indicates that this section should be allocated in the Reset memory region.