rp2_common/pico_standard_link: linker script fixes (#1539)

The resulting elf binaries contained an unusual section that leads to an error
when objcopy attempts to update a section (e.g. when using the picowota
combined build mechanism).

This seemed to be due to the order of sections, where two RAM-only sections
were split by a RAM/FLASH section. By moving the RAM-only sections together,
this issue disappeared.
This commit is contained in:
Maarten van der Schrieck 2024-01-12 23:18:42 +01:00 committed by GitHub
parent 73dce4e540
commit 4d19007607
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 18 deletions

View File

@ -121,6 +121,11 @@ SECTIONS
*(.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__ = .;

View File

@ -100,6 +100,11 @@ SECTIONS
*(.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__ = .;

View File

@ -121,6 +121,11 @@ SECTIONS
*(.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__ = .;