Skip to content

Commit 734e528

Browse files
tejlmandcfriedt
authored andcommitted
cmake: linker: arm: utilize zephyr_linker_group(... SYMBOL SECTION)
The root cause of #38591 was region symbols being placed before the section description for data region. To support both schemes with the linker generator, a new `SYMBOL SECTION` argument has been added to the zephyr_linker_group() function. This commit updates the arm/linker.cmake CMake linker file to use the new `SYMBOL SECTION` argument for the data region group and text region group so that those two groups now behave identical to the behavior when using the cortex_m linker.ld template. Signed-off-by: Torsten Rasmussen <[email protected]>
1 parent 57ab034 commit 734e528

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/linker_script/arm/linker.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ else()
5959
endif()
6060

6161
zephyr_linker_group(NAME RAM_REGION VMA RAM LMA ROM_REGION)
62-
zephyr_linker_group(NAME TEXT_REGION GROUP ROM_REGION)
62+
zephyr_linker_group(NAME TEXT_REGION GROUP ROM_REGION SYMBOL SECTION)
6363
zephyr_linker_group(NAME RODATA_REGION GROUP ROM_REGION)
64-
zephyr_linker_group(NAME DATA_REGION GROUP RAM_REGION)
64+
zephyr_linker_group(NAME DATA_REGION GROUP RAM_REGION SYMBOL SECTION)
6565

6666
# should go to a relocation.cmake - from include/linker/rel-sections.ld - start
6767
zephyr_linker_section(NAME .rel.plt HIDDEN)

0 commit comments

Comments
 (0)