linker: section_tags: missing include #76254
Labels
area: Linker Scripts
bug
The issue is a bug, or the PR is fixing a bug
priority: medium
Medium impact/importance bug
Describe the bug
Using section tags like
__dtcm_noinit_section
should resolve to:However, due to a missing include, they resolve to:
... failing to move the variable to the proper section and causing the following warning:
To Reproduce
samples/hello_world/src/main.c
to contain:west build -b mimxrt1170_evk/mimxrt1176/cm7 samples/hello_world/
Expected behavior
Impact
All projects that use
<zephyr/linker/linker_sections.h>
directly fail to link to the appropriate section.There is no indication anywhere that this header cannot be used directly. (at least none that I could find)
Logs and console output
Additional context
This wasn't reproducible on any of the examples before, because the ones that are susceptible (like
samples/boards/mimxrt1170_evk_cm7/magic_addr/
) include<zephyr/kernel.h>
, which indirectly pulls in the required header to resolve the defines:#include <zephyr/kernel.h>
#include <zephyr/kernel_includes.h>
#include <zephyr/linker/sections.h>
Workarounds
Including
<zephyr/kernel.h>
or<zephyr/linker/sections.h>
in user code fixes this issue.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: