ATxmega128A1U flash program memory includes an application section of 120KB, an application table section of 8KB, and a boot loader section of 8KB. The flash map is shown in the figure below. For this application note, the bootloader implementation targets to re-program the application flash section.

Reading and writing (including erasing) the flash memory from the application code inside the device is referred to as self-programming for flash memory. A bootloader is such an application for this purpose. For ATxmega128A1U, to perform flash erase and write, the SPM instruction must be called and this instruction can only be performed from the boot loader flash section.
Wl,--section-start=.mysection=0x1E000 -Wl,--section-start=.text=0x20000

#if defined(__GNUC__)
void PMIC_SetVectorLocationToBoot( void )__attribute__((section(".mysection")));
#endif