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

Scaffold out stack size analysis #6

Open
mullr opened this issue Jul 17, 2019 · 0 comments
Open

Scaffold out stack size analysis #6

mullr opened this issue Jul 17, 2019 · 0 comments

Comments

@mullr
Copy link
Contributor

mullr commented Jul 17, 2019

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.

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

No branches or pull requests

1 participant