А чем жёсткий стартап (область векторов прерываний) не устраивают?
Посчитал один раз контрольную сумму и забыл.
Как например в CW
Код
.section .vectors, "ax"
.code 32
.align 0
_vectors:
ldr pc, [pc, #reset_handler_address - . - 8] /* reset */
ldr pc, [pc, #undef_handler_address - . - 8] /* undefined instruction */
ldr pc, [pc, #swi_handler_address - . - 8] /* swi handler */
ldr pc, [pc, #pabort_handler_address - . - 8] /* abort prefetch */
ldr pc, [pc, #dabort_handler_address - . - 8] /* abort data */
#ifdef VECTORED_IRQ_INTERRUPTS
.word 0xB9205F88 /* boot loader checksum */
ldr pc, [pc, #-0xFF0] /* irq handler */
#else
.word 0xB8A06F60 /* boot loader checksum */
ldr pc, [pc, #irq_handler_address - . - 8] /* irq handler */
#endif
ldr pc, [pc, #fiq_handler_address - . - 8] /* fiq handler */
reset_handler_address:
.word reset_handler
undef_handler_address:
.word undef_handler
swi_handler_address:
.word swi_handler
pabort_handler_address:
.word pabort_handler
dabort_handler_address:
.word dabort_handler
#ifndef VECTORED_IRQ_INTERRUPTS
irq_handler_address:
.word irq_handler
#endif
fiq_handler_address:
.word fiq_handler
Иль ради экономии нескольких байт/тактов? ...