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

[Backport v3.4-branch] Fix linker scripts to define _end correctly #59808

Merged
merged 2 commits into from
Aug 4, 2023

Commits on Jun 28, 2023

  1. include/zephyr: Fix linker scripts to define _end after all static RA…

    …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]>
    (cherry picked from commit 710422e)
    keith-packard authored and github-actions[bot] committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    d329222 View commit details
    Browse the repository at this point in the history
  2. cmake/linker_script: Fix cmake linker scripts to define _end

    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]>
    (cherry picked from commit bbec614)
    keith-packard authored and github-actions[bot] committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    a5f3a7f View commit details
    Browse the repository at this point in the history