Skip to content

CAPALIGN in lld does not appear to be moving the base up #285

@davidchisnall

Description

@davidchisnall

Working on supporting large stacks in the RTOS, we end up with something like this in the linker script:

    . = ALIGN(16);
    .thread_stack_1 : CAPALIGN
    {
        .thread_1_stack_start = .;
        . += 0x10000;
        .thread_1_stack_end = .;
    }

The start of the thread stack ends up 16-byte aligned, which is not sufficient for the 0x10000-byte chunk. I believe you can minimally reproduce this by starting with something like . = 0x8000010;, if not try setting a large stack size in the hello-world example in the RTOS and just delete the bits in sdk/xmake.lua that reject it.

Metadata

Metadata

Assignees

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