I am using a bootloader on the STM32F207ZET controller at address 0x0800 0000, and the application is located at an offset of 16KB.
When I enable Link Time optimisation, control jumps to startup_stm32F207xx.s startup code, and calls SystemInit but results in BUS FAULT when branching to __main.
Disabling LTO makes it work again, meaning the implementation is correct.
Thank you for your response. I have moved your question to the Compiler and Libraries forum.