Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Linker scripts do not define _end correctly #60794

Conversation

keith-packard
Copy link
Collaborator

@keith-packard keith-packard commented Jul 25, 2023

Fixes: #60545

…M data

The Zephyr linker scripts have inconsistent ordering of various chunks of
data which lands in RAM at runtime. This leads to the value of _end not
being consistently defined as the maximum address of static variables used
in the application.

Create a helper linker fragment, zephyr/linker/ram-end.ld, which can be
included after the last possible definition of RAM data, that consistently
sets _image_ram_end, _end and z_mapped_end.

Signed-off-by: Keith Packard <[email protected]>
The generated scripts don't include a definition for any symbol indicating
the end of statically allocated memory (such as "_end"). Add a shared cmake
fragment, ram-end.cmake, which contains the necessary instructions to
define _end and z_mapped_end consistently to align with the other sample
linker scripts.

Signed-off-by: Keith Packard <[email protected]>
@fkokosinski
Copy link
Member

Hi, I've removed myself from assignees and assigned @tejlmand instead, who was the assignee in the original PR: #57727.

@nashif nashif added Backport Backport PR and backport failure issues and removed Backport Backport PR and backport failure issues labels Aug 10, 2023
@nashif nashif changed the title Backport 57727 to v3.4 branch Fix: Linker scripts do not define _end correctly Aug 10, 2023
@mbolivar-ampere mbolivar-ampere merged commit 22813dd into zephyrproject-rtos:v3.4-branch Aug 15, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport Backport PR and backport failure issues
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants