I am working on sharing code between an app and bootloader. I am locating a jump table at the end of the bootloader that is in its own named section and positioned with --section-start.
For consistency, I am calling through the jumptable pointers in both the app and bootloader. But the problem is that the linker will drop the jump table section when using --gc-sections if there is nothing explicitly calling on of those functions.
Is there a clean way to prevent this with another linker flags? Or will I be forced to make a direct call to a function in that section?