Multiple Application Code with Bootloader

Hello,

Looking for some pointers on the scenario below. I'm fairly new to firmware and bare-metal programming.

In the system I'm working on, I am looking to get a bootloader and 2 application programs compiled. The 2 application programs will be placed in FLASH but they maybe overriden by a firmware update depending on which firmware is invalid. The location of the bootloader is fixed and with the firmware update scenario 2 application programs do not have a known physical location.

How would I get the 2 application programs compiled given that I am not able to determine what is the final locations during compile time. Is there a way to make it relocatable via some linking or compile switches?

I'm using the ARM GCC Toolchain on Linux and working on a Cortex M0 MCU.

Thanking everybody in advance.

More questions in this forum