Skip to content

Conversation

tlevora
Copy link
Contributor

@tlevora tlevora commented Feb 9, 2025

The stack end / heap start is placed just after .uninit section. It is fine until a custom section is placed just after the .uninit section. If application places a custom section just after the .uninit section, there is a collision of the custom section and heap start / stack end.

There is still a solution since both __sheap and _stack_end are designed to be overrided by an application, but changing their placement in the proposed way can save some debugging time. Proposed fix does not change behavior if no custom section added.

The stack end / heap start is placed just after `.uninit` section. It is
fine until a custom section is placed just after the `.uninit` section.
If application places a custom section just after the `.uninit` section,
there is a collision of the custom section and heap start / stack end.

There is still a solution since both `__sheap` and `_stack_end` are
designed to be overrided by an application, but changing their placement
in the proposed way can save some debugging time. Proposed fix does not
change behavior if no custom section added.
@tlevora tlevora requested a review from a team as a code owner February 9, 2025 12:45
@jonathanpallant
Copy link
Contributor

Looks good to me. @adamgreig ?

@adamgreig
Copy link
Member

Yep, LGTM. Thanks @tlevora.

@adamgreig adamgreig added this pull request to the merge queue Apr 14, 2025
Merged via the queue into rust-embedded:master with commit 118b9a7 Apr 14, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants