Freaks,
I am >>certain<< that this must have been addressed before, but darned if I can find it.
I've got an application that uses -nostartfiles, with my own CRT in .init0. I'd like to use either __flash or PROGMEM to avoid both SRAM usage and the linking of __do_copy_data. Of course, when I have any __flash or PROGMEM entities in the source code, that gets linked at the beginning of the binary, before even .init0 where I have placed my own mini CRT, which means the data there will run as code after a reset. Bad.
I know I can use -section-start= to explicitly locate a section to an absolute address, but what I want to do is just move __flash or PROGMEM to somewhere other than start of the binary, and let the linker decide the exact address that should be. A good place in my view would be anywhere after .fini0, either before .data or after it, but it really doesn't matter much to me other than that.
I know that this would be possible by tickling my own custom linker script, but I currently know only enough linker-script-eese to get my face slapped at a party. Is there another way? If not, can anyone suggest a reasonable/correct approach for a custom linker script to achieve this?
Thanks.