How do I make sure that the bootloader gets linked only into its specified space?

To make sure the bootloader gets linked only into its space, you have to reduce the FLASH memory for it. For example, the settings in the following figure limits the FLASH memory from 0x0000 (vector table) up to 0x3FFF. That means your application memory area starts at 0x4000.

Figure 1. Bootloader FLASH Area

Bootloader FLASH Area

Change the available flash for the bootloader in the CPU properties, and cut the available FLASH size on the KL25Z128 from 0x1FBF0 (~128 KByte) in the Build options tab to 0x3FB0. With this, the bootloader occupies the space from address 0x0000 (vector table) up to 0x3FFF.