You can change the location of your code within flash, you'll just need to modify your linker file. Your bootloader will then need to start executing code from the new location when desired.
If you're using GCC look for the following section in you linker (*.ld) file.
vectorrom (RX): ORIGIN = 0x00000000, LENGTH = 0x00000400
cfmprotrom (R): ORIGIN = 0x00000400, LENGTH = 0x00000020
rom (RX): ORIGIN = 0x00000420, LENGTH = 0x000FFBE0 /* Code + Const data */
You can change the address of vectorrom, cfmprotrom, and rom to start at a location after your bootloader. Program your code at the new address and then have the bootloader start executing from the new address.
Erich Styger has some articles that may help too.
https://mcuoneclipse.com/2014/10/06/putting-code-of-files-into-special-section-with-the-gnu-linker/
https://mcuoneclipse.com/2012/04/27/programming-part-of-flash/
Hope that helps,
Sean