diff --git a/src/rp2_common/pico_standard_link/memmap_blocked_ram.ld b/src/rp2_common/pico_standard_link/memmap_blocked_ram.ld index e9142d29b..52384e1d6 100644 --- a/src/rp2_common/pico_standard_link/memmap_blocked_ram.ld +++ b/src/rp2_common/pico_standard_link/memmap_blocked_ram.ld @@ -117,10 +117,15 @@ SECTIONS __binary_info_end = .; . = ALIGN(4); - .ram_vector_table (NOLOAD): { + .ram_vector_table (NOLOAD): { *(.ram_vector_table) } > RAM + .uninitialized_data (NOLOAD): { + . = ALIGN(4); + *(.uninitialized_data*) + } > RAM + .data : { __data_start__ = .; *(vtable) @@ -173,11 +178,6 @@ SECTIONS /* __etext is (for backwards compatibility) the name of the .data init source pointer (...) */ __etext = LOADADDR(.data); - .uninitialized_data (NOLOAD): { - . = ALIGN(4); - *(.uninitialized_data*) - } > RAM - /* Start and end symbols must be word-aligned */ .scratch_x : { __scratch_x_start__ = .; diff --git a/src/rp2_common/pico_standard_link/memmap_copy_to_ram.ld b/src/rp2_common/pico_standard_link/memmap_copy_to_ram.ld index ea81ceced..1d7e514f5 100644 --- a/src/rp2_common/pico_standard_link/memmap_copy_to_ram.ld +++ b/src/rp2_common/pico_standard_link/memmap_copy_to_ram.ld @@ -96,10 +96,15 @@ SECTIONS . = ALIGN(4); /* Vector table goes first in RAM, to avoid large alignment hole */ - .ram_vector_table (NOLOAD): { + .ram_vector_table (NOLOAD): { *(.ram_vector_table) } > RAM + .uninitialized_data (NOLOAD): { + . = ALIGN(4); + *(.uninitialized_data*) + } > RAM + .text : { __ram_text_start__ = .; *(.init) @@ -175,11 +180,6 @@ SECTIONS /* __etext is (for backwards compatibility) the name of the .data init source pointer (...) */ __etext = LOADADDR(.data); - .uninitialized_data (NOLOAD): { - . = ALIGN(4); - *(.uninitialized_data*) - } > RAM - /* Start and end symbols must be word-aligned */ .scratch_x : { __scratch_x_start__ = .; diff --git a/src/rp2_common/pico_standard_link/memmap_default.ld b/src/rp2_common/pico_standard_link/memmap_default.ld index e85b32791..b4dadfc0c 100644 --- a/src/rp2_common/pico_standard_link/memmap_default.ld +++ b/src/rp2_common/pico_standard_link/memmap_default.ld @@ -117,10 +117,15 @@ SECTIONS __binary_info_end = .; . = ALIGN(4); - .ram_vector_table (NOLOAD): { + .ram_vector_table (NOLOAD): { *(.ram_vector_table) } > RAM + .uninitialized_data (NOLOAD): { + . = ALIGN(4); + *(.uninitialized_data*) + } > RAM + .data : { __data_start__ = .; *(vtable) @@ -173,11 +178,6 @@ SECTIONS /* __etext is (for backwards compatibility) the name of the .data init source pointer (...) */ __etext = LOADADDR(.data); - .uninitialized_data (NOLOAD): { - . = ALIGN(4); - *(.uninitialized_data*) - } > RAM - /* Start and end symbols must be word-aligned */ .scratch_x : { __scratch_x_start__ = .;