diff --git a/ld/scripttempl/elfd30v.sc b/ld/scripttempl/elfd30v.sc index ad76a995d5..fe74e3de58 100644 --- a/ld/scripttempl/elfd30v.sc +++ b/ld/scripttempl/elfd30v.sc @@ -19,14 +19,6 @@ SECTIONS ${RELOCATING+ PROVIDE (__stext_end = .) ; } } ${RELOCATING+ > text} - /* External memory */ - .etext ${RELOCATING-0} : - { - ${RELOCATING+ PROVIDE (__etext_start = .) ; } - *(.etext) - ${RELOCATING+ PROVIDE (__etext_end = .) ; } - } ${RELOCATING+ > emem} - /* Internal text space or external memory */ .text : { @@ -47,14 +39,6 @@ SECTIONS ${RELOCATING+ PROVIDE (__sdata_end = .) ; } } ${RELOCATING+ > data} - /* External memory */ - .edata ${RELOCATING-0} : - { - ${RELOCATING+ PROVIDE (__edata_start = .) ; } - *(.edata) - ${RELOCATING+ PROVIDE (__edata_end = .) ; } - } ${RELOCATING+ > emem} - /* Internal data space or external memory */ .strings ${RELOCATING-0} : { *(.strings) } ${RELOCATING+ > ${DATA_MEMORY}} .rodata ${RELOCATING-0} : { *(.rodata) } ${RELOCATING+ > ${DATA_MEMORY}} @@ -83,6 +67,21 @@ SECTIONS ${RELOCATING+ _edata = . ; } } ${RELOCATING+ > ${DATA_MEMORY}} + /* External memory */ + .etext ${RELOCATING-0} : + { + ${RELOCATING+ PROVIDE (__etext_start = .) ; } + *(.etext) + ${RELOCATING+ PROVIDE (__etext_end = .) ; } + } ${RELOCATING+ > emem} + + .edata ${RELOCATING-0} : + { + ${RELOCATING+ PROVIDE (__edata_start = .) ; } + *(.edata) + ${RELOCATING+ PROVIDE (__edata_end = .) ; } + } ${RELOCATING+ > emem} + .sbss ${RELOCATING-0} : { ${RELOCATING+ PROVIDE (__sbss_start = .) ; }