Skip to content

.stack section placement contradicts PR #4518 discussion - causing app failures #4659

@qinghaoh

Description

@qinghaoh

In PR #4518, specifically this commit, the .stack section was placed at a higher address than the .relocate section in the linker script.

This change has caused failures in our Tock app (still investigating the root cause), but I'm confused about the intent because there seems to be a contradiction between the discussion and the actual implementation.

The contradiction

In the PR discussion, @alexandruradovici stated:

I placed the .stack before .relocate, as this was the original ordering, and it seems to work now. @JADarius can you confirm that the Pico can load an application? The key change is that the .text section is defined before the .stack section.

However, the actual code places .stack after .relocate (at higher addresses), which is the opposite of "before" in terms of linker script ordering.

@alexandruradovici - Could you clarify the intended memory layout and whether the current implementation matches that intent?

Adding @reynoldsbd as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions