23.3.4.9 .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).

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. This potentially causes 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