Is there a way to prevent cross references betweeen two sections, so that for example functions located in the .boot section can't call functions located in the .user section? I'm developing a custom bootloader and I need it for obvious reasons. I've digged through the scatter loading documentation but I didn't find the equivalent of the NOCROSSREFS() directive used in ld. (I'm using armcc and armlink)
I don't see it as a limitation when a linker behaves like 99+% of all linkers.
Especially since most companies have an explicit or implicit policy that boot loaders must be separately version-controlled. And separately validated. And separately integrity-checked. All trivial when separate source code produces a separate hex file.
And I don't see much need for studying to remove the end line from the intel-hex file with the boot loader and then do a trivial concatenation of this hex file with the hex file for the application to get a merged binary suitable for factory programming.
When developing, I don't need to download any boot loader - it's already in the board. And the JTAG debugger would normally not need any boot loader to be there, since init scripts can duplicate boot loader state changes.