diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc index 4d9af7fcf2c..a902385a013 100644 --- a/ld/scripttempl/avr.sc +++ b/ld/scripttempl/avr.sc @@ -186,7 +186,9 @@ SECTIONS /* Internal text space or external memory. */ .text ${RELOCATING-0} : { - ${RELOCATING+*(.vectors) +EOF +test -z "${RELOCATING}" || cat <> 15); __RODATA_FLASH_START__ = __flmap << 15; __rodata_load_start = MAX (__data_load_end, __RODATA_FLASH_START__); -__rodata_start = __RODATA_ORIGIN__ + __rodata_load_start - __RODATA_FLASH_START__;} - +__rodata_start = __RODATA_ORIGIN__ + __rodata_load_start - __RODATA_FLASH_START__; +EOF +cat << EOF .rodata ${RELOCATING+ __rodata_start} ${RELOCATING-0} : ${RELOCATING+ AT (__rodata_load_start)} { *(.rodata)