Microchip Technology SW006023-2N Data Sheet
Linking Programs
2012 Microchip Technology Inc.
DS51686E-page 183
17.4.4.6
.VECTOR_0 .. .VECTOR_63 SECTIONS
These sections contain the handler for each of the interrupt vectors. These sections are
located at the correct vectored addresses using the formula:
located at the correct vectored addresses using the formula:
_ebase_address + 0x200 + (_vector_spacing << 5) * n
where n is the respective vector number.
Each of the sections is followed by an assert that ensures the code located at the vector
does not exceed the vector spacing specified.
does not exceed the vector spacing specified.
.vector_n _ebase_address + 0x200 + (_vector_spacing << 5) * n :
{
KEEP(*(.vector_n))
} > exception_mem
ASSERT (SIZEOF(.vector_n) < (_vector_spacing << 5), "function at
exception vector n too large")
17.4.4.7
.START-UP SECTION
In XC32, the C and C++ startup code is located in the .reset section. We maintain
the .startup output section in the default linker script for backwards compatibility
purposes only.
the .startup output section in the default linker script for backwards compatibility
purposes only.
.startup ORIGIN(kseg0_boot_mem) :
{
*(.startup)
} > kseg0_boot_mem
17.4.4.8
.TEXT SECTION
The standard executable code sections are no longer mapped to the .text output
section. However, a few special executable sections are still mapped here as shown
below. This section is assigned to the program memory region
(kseg0_program_mem) and has a fill value of NOP (0).
section. However, a few special executable sections are still mapped here as shown
below. This section is assigned to the program memory region
(kseg0_program_mem) and has a fill value of NOP (0).
The built-in linker script no longer maps standard .text executable code input
sections. By not mapping these sections in the linker script, we allow these sections to
be allocated using the best-fit allocator rather than the sequential allocator. Sections
that are unmapped in the linker script, can flow around absolute sections specified in
code whereas sections that are linker-script mapped are grouped together and
allocated sequentially, potentially causing conflicts with absolute sections (using the
address function attribute).
sections. By not mapping these sections in the linker script, we allow these sections to
be allocated using the best-fit allocator rather than the sequential allocator. Sections
that are unmapped in the linker script, can flow around absolute sections specified in
code whereas sections that are linker-script mapped are grouped together and
allocated sequentially, potentially causing conflicts with absolute sections (using the
address function attribute).
.text ORIGIN(kseg0_program_mem) :
{
*(.stub .gnu.linkonce.t.*)
KEEP (*(.text.*personality*))
*(.gnu.warning)
*(.mips16.fn.*)
*(.mips16.call.*)
} > kseg0_program_mem =0