Skip to content

Scaffold out stack size analysis #6

@mullr

Description

@mullr

If you have a keep-stack-sizes.x with:

SECTIONS
{
  .stack_sizes (INFO) :
  {
    KEEP(*(.stack_sizes));
  }
}

Then you can:

cargo install stack-sizes

RUSTFLAGS="-Z emit-stack-sizes -C link-arg=-Wl,-Tkeep-stack-sizes.x -C link-arg=-N -C link-arg=-nostartfiles" \
  selfe build --platform virt --sel4_arch aarch64

stack-sizes target/aarch64-unknown-linux-gnu/debug/my-project  | sort -g -k 2 | less

It may be appropriate for the selfe command to help with some of this.

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