-# Copyright (C) 2014-2016 Free Software Foundation, Inc.
-#
+# Copyright (C) 2014-2022 Free Software Foundation, Inc.
+#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
# 6. EXT_ROM EXT_RAM (mpmode,extram,extrom)
# 7. EXT_RAM EXT_RAM (mpmode,extram)
#
-# In MC mode, TEXT and DATA are copied into RAM by the bootloader.
+# In MC mode, TEXT and DATA are copied into RAM by the bootloader.
#
# In MP mode with external ROM, DATA needs to be copied into RAM at boot time.
#
-# If there is external RAM it is better to use that and reserve the internal RAM
+# If there is external RAM it is better to use that and reserve the internal RAM
# for data buffers. However, the address of the external RAM needs to be specified.
#
# This emulation assumes config 7.
${RELOCATING+/* Linker script for $OUTPUT_ARCHNAME executable. */}
${RELOCATING-/* Linker script for $OUTPUT_ARCHNAME object file (ld -r). */}
-/* Copyright (C) 2014-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2014-2022 Free Software Foundation, Inc.
Copying and distribution of this script, with or without modification,
are permitted in any medium without royalty provided the copyright
/* Program code. */
.text : {
${RELOCATING+ __text = .;}
- ${RELOCATING+ *(.init)}
+ ${RELOCATING+ KEEP (*(SORT_NONE(.init)))}
*(.text)
${CONSTRUCTING+ ___CTOR_LIST__ = .;}
${CONSTRUCTING+ LONG(___CTOR_END__ - ___CTOR_LIST__ - 2)}
${CONSTRUCTING+ *(.dtors)}
${CONSTRUCTING+ LONG(0)}
${CONSTRUCTING+ ___DTOR_END__ = .;}
- ${RELOCATING+ *(.fini)}
+ ${RELOCATING+ KEEP (*(SORT_NONE(.fini)))}
${RELOCATING+ __etext = .;}
} ${RELOCATING+ > ${TEXT_MEMORY}}
/* Global initialised variables. */
.data :
- {
+ {
${RELOCATING+ __data = .;}
*(.data)
${RELOCATING+ __edata = .;}
} ${RELOCATING+ > ${DATA_MEMORY}}
/* Global uninitialised variables. */
.bss : {
- ${RELOCATING+ __bss = .;}
+ ${RELOCATING+ __bss = .;}
*(.bss)
*(COMMON)
${RELOCATING+ __end = .;}
} ${RELOCATING+ > ${DATA_MEMORY}}
/* Heap. */
.heap :
- {
- ${RELOCATING+ __heap = .;}
+ {
+ ${RELOCATING+ __heap = .;}
${RELOCATING+ . += __HEAP_SIZE};
} ${RELOCATING+ > ${DATA_MEMORY}}
/* Stack (grows upward). */
.stack :
- {
- ${RELOCATING+ __stack = .;}
+ {
+ ${RELOCATING+ __stack = .;}
*(.stack)
- ${RELOCATING+ . = . + __STACK_SIZE};
+ ${RELOCATING+ . = . + __STACK_SIZE};
} ${RELOCATING+ > ${DATA_MEMORY}}
- .stab 0 ${RELOCATING+(NOLOAD)} :
+ .stab 0 ${RELOCATING+(NOLOAD)} :
{
[ .stab ]
}