Files
2026-11-09 17:35:03 -05:00

235 lines
3.9 KiB
Plaintext

/* Define the sections, and where they are mapped in memory */
SECTIONS
{
/* This will get stripped out before uploading, but we need to place code
here so we can at least link to it (install_hot_table) */
.hot_init : {
KEEP (*(.hot_magic))
KEEP (*(.hot_init))
} > HOT_MEMORY
.text : {
KEEP (*(.vectors))
/* boot data should be exactly 32 bytes long */
*(.boot_data)
. = 0x20;
*(.boot)
. = ALIGN(64);
*(.freertos_vectors)
*(.text)
*(.text.*)
*(.gnu.linkonce.t.*)
*(.plt)
*(.gnu_warning)
*(.gcc_except_table)
*(.glue_7)
*(.glue_7t)
*(.vfp11_veneer)
*(.ARM.extab)
*(.gnu.linkonce.armextab.*)
} > RAM
.init : {
KEEP (*(.init))
} > RAM
.fini : {
KEEP (*(.fini))
} > RAM
.rodata : {
__rodata_start = .;
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
__rodata_end = .;
} > RAM
.rodata1 : {
__rodata1_start = .;
*(.rodata1)
*(.rodata1.*)
__rodata1_end = .;
} > RAM
.sdata2 : {
__sdata2_start = .;
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*)
__sdata2_end = .;
} > RAM
.sbss2 : {
__sbss2_start = .;
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
__sbss2_end = .;
} > RAM
.data : {
__data_start = .;
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
*(.jcr)
*(.got)
*(.got.plt)
__data_end = .;
} > RAM
.data1 : {
__data1_start = .;
*(.data1)
*(.data1.*)
__data1_end = .;
} > RAM
.got : {
*(.got)
} > RAM
.ctors : {
__CTOR_LIST__ = .;
___CTORS_LIST___ = .;
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE(*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
__CTOR_END__ = .;
___CTORS_END___ = .;
} > RAM
.dtors : {
__DTOR_LIST__ = .;
___DTORS_LIST___ = .;
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE(*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
__DTOR_END__ = .;
___DTORS_END___ = .;
} > RAM
.fixup : {
__fixup_start = .;
*(.fixup)
__fixup_end = .;
} > RAM
.eh_frame : {
*(.eh_frame)
} > RAM
.eh_framehdr : {
__eh_framehdr_start = .;
*(.eh_framehdr)
__eh_framehdr_end = .;
} > RAM
.gcc_except_table : {
*(.gcc_except_table)
} > RAM
.ARM.exidx : {
__exidx_start = .;
*(.ARM.exidx*)
*(.gnu.linkonce.armexidix.*.*)
__exidx_end = .;
} > RAM
.preinit_array : {
__preinit_array_start = .;
KEEP (*(SORT(.preinit_array.*)))
KEEP (*(.preinit_array))
__preinit_array_end = .;
} > RAM
.init_array : {
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
} > RAM
.fini_array : {
__fini_array_start = .;
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array))
__fini_array_end = .;
} > RAM
/DISCARD/ : {
*(.ARM.attributes*)
}
.sdata : {
__sdata_start = .;
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
__sdata_end = .;
} > RAM
.sbss (NOLOAD) : {
__sbss_start = .;
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
__sbss_end = .;
} > RAM
.tdata : {
__tdata_start = .;
*(.tdata)
*(.tdata.*)
*(.gnu.linkonce.td.*)
__tdata_end = .;
} > RAM
.tbss : {
__tbss_start = .;
*(.tbss)
*(.tbss.*)
*(.gnu.linkonce.tb.*)
__tbss_end = .;
} > RAM
.bss (NOLOAD) : {
__bss_start = .;
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
__bss_end = .;
} > RAM
_SDA_BASE_ = __sdata_start + ((__sbss_end - __sdata_start) / 2 );
_SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2 );
/* Stack section
provides __stack for the partner SDK initialization (vexMain).
This prevents the stack from being placed in .bss, which would
cause corruption of variables at the end of .bss (see issue #783).
FreeRTOS task stacks are dynamically allocated separately. */
.stack (NOLOAD) : ALIGN(8) {
_stack_end = .;
. += _STACK_SIZE;
__stack = .;
_stack_start = .;
} > RAM
.heap (NOLOAD) : {
. = ALIGN(16);
_heap = .;
HeapBase = .;
_heap_start = .;
. += _HEAP_SIZE;
_heap_end = .;
HeapLimit = .;
} > HEAP
_end = .;
}