diff --git a/os/common/startup/ARM/compilers/GCC/ld/rules.ld b/os/common/startup/ARM/compilers/GCC/ld/rules.ld index 42716d609..79d563491 100644 --- a/os/common/startup/ARM/compilers/GCC/ld/rules.ld +++ b/os/common/startup/ARM/compilers/GCC/ld/rules.ld @@ -96,9 +96,11 @@ SECTIONS } > flash .ARM.exidx : { - PROVIDE(__exidx_base__ = .); + __exidx_base__ = .; + __exidx_start = .; *(.ARM.exidx* .gnu.linkonce.armexidx.*) - PROVIDE(__exidx_end__ = .); + __exidx_end__ = .; + __exidx_end = .; } > flash .eh_frame_hdr : diff --git a/os/common/startup/ARMCMx-SB/compilers/GCC/crt0.S b/os/common/startup/ARMCMx-SB/compilers/GCC/crt0.S index 0e27ca88c..dcb0e4273 100644 --- a/os/common/startup/ARMCMx-SB/compilers/GCC/crt0.S +++ b/os/common/startup/ARMCMx-SB/compilers/GCC/crt0.S @@ -130,9 +130,9 @@ upsloop: #if CRT0_INIT_DATA == TRUE /* Data initialization. Note, it assumes that the DATA size is a multiple of 4 so the linker file must ensure this.*/ - ldr r1, =_textdata_start - ldr r2, =_data_start - ldr r3, =_data_end + ldr r1, =__textdata_base__ + ldr r2, =__data_base__ + ldr r3, =__data_end__ dloop: cmp r2, r3 ittt lo @@ -145,8 +145,8 @@ dloop: /* BSS initialization. Note, it assumes that the DATA size is a multiple of 4 so the linker file must ensure this.*/ movs r0, #0 - ldr r1, =_bss_start - ldr r2, =_bss_end + ldr r1, =__bss_base__ + ldr r2, =__bss_end__ bloop: cmp r1, r2 itt lo @@ -156,8 +156,8 @@ bloop: #if CRT0_CALL_CONSTRUCTORS == TRUE /* Constructors invocation.*/ - ldr r4, =__init_array_start - ldr r5, =__init_array_end + ldr r4, =__init_array_base__ + ldr r5, =__init_array_end__ initloop: cmp r4, r5 bge endinitloop @@ -172,8 +172,8 @@ endinitloop: #if CRT0_CALL_DESTRUCTORS == TRUE /* Destructors invocation.*/ - ldr r4, =__fini_array_start - ldr r5, =__fini_array_end + ldr r4, =__fini_array_base__ + ldr r5, =__fini_array_end__ finiloop: cmp r4, r5 bge endfiniloop diff --git a/os/common/startup/ARMCMx-SB/compilers/GCC/ld/rules_code.ld b/os/common/startup/ARMCMx-SB/compilers/GCC/ld/rules_code.ld index bdfd2e527..656841029 100644 --- a/os/common/startup/ARMCMx-SB/compilers/GCC/ld/rules_code.ld +++ b/os/common/startup/ARMCMx-SB/compilers/GCC/ld/rules_code.ld @@ -25,25 +25,25 @@ SECTIONS .xtors : ALIGN(4) { - __init_array_start = .; + __init_array_base__ = .; KEEP(*(SORT(.init_array.*))) KEEP(*(.init_array)) - __init_array_end = .; - __fini_array_start = .; + __init_array_end__ = .; + __fini_array_base__ = .; KEEP(*(.fini_array)) KEEP(*(SORT(.fini_array.*))) - __fini_array_end = .; + __fini_array_end__ = .; } > CODE_SPACE - .text : ALIGN(4) + .text : ALIGN_WITH_INPUT { - __text_base = .; + __text_base__ = .; *(.text) *(.text.*) *(.glue_7t) *(.glue_7) *(.gcc*) - __text_end = .; + __text_end__ = .; } > CODE_SPACE .rodata : ALIGN(4) @@ -61,8 +61,10 @@ SECTIONS } > CODE_SPACE .ARM.exidx : { + __exidx_base__ = .; __exidx_start = .; *(.ARM.exidx* .gnu.linkonce.armexidx.*) + __exidx_end__ = .; __exidx_end = .; } > CODE_SPACE diff --git a/os/common/startup/ARMCMx-SB/compilers/GCC/ld/rules_data.ld b/os/common/startup/ARMCMx-SB/compilers/GCC/ld/rules_data.ld index 46c59a772..6d474eaf6 100644 --- a/os/common/startup/ARMCMx-SB/compilers/GCC/ld/rules_data.ld +++ b/os/common/startup/ARMCMx-SB/compilers/GCC/ld/rules_data.ld @@ -20,24 +20,24 @@ SECTIONS { PROVIDE(_textdata = LOADADDR(.data)); PROVIDE(_data = .); - _textdata_start = LOADADDR(.data); - _data_start = .; + __textdata_base__ = LOADADDR(.data); + __data_base__ = .; *(.data) *(.data.*) *(.ramtext) . = ALIGN(4); PROVIDE(_edata = .); - _data_end = .; + __data_end__ = .; } > DATA_SPACE .bss (NOLOAD) : ALIGN(4) { - _bss_start = .; + __bss_base__ = .; *(.bss) *(.bss.*) *(COMMON) . = ALIGN(4); - _bss_end = .; + __bss_end__ = .; PROVIDE(end = .); } > DATA_SPACE } diff --git a/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld b/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld index b44bae05e..888cc712e 100644 --- a/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld +++ b/os/common/startup/ARMCMx/compilers/GCC/ld/rules_code.ld @@ -62,8 +62,10 @@ SECTIONS .ARM.exidx : { __exidx_base__ = .; + __exidx_start = .; *(.ARM.exidx* .gnu.linkonce.armexidx.*) __exidx_end__ = .; + __exidx_end = .; } > VARIOUS_FLASH AT > VARIOUS_FLASH_LMA .eh_frame_hdr : diff --git a/readme.txt b/readme.txt index 15b6bd608..8b3533adf 100644 --- a/readme.txt +++ b/readme.txt @@ -86,6 +86,8 @@ MEMS Accelerometers. - NEW: Safer messages mechanism for sandboxes (to be backported to 20.3.1). - NEW: Added latency measurement test application. +- FIX: Fixed missing symbols in GCC scatter files (bug #1091) + (backported to 20.3.1). - FIX: Fixed wrong SAI1 clock selection for STM32G4xx (bug #1090) (backported to 20.3.1). - FIX: Fixed STM32H7xx ADC problem in dual mode (bug #1089)