pw_kernel: Store stacks in .bss to save space This change saves ~4,000 bytes from the kernel ELF file. In particular, here are the outputs of `bazelisk build --config k_host //pw_kernel/tooling:code_size` from before and after this change: Before ====== bazel-out/darwin_x86_64-opt/bin/pw_kernel/target/mps2_an505/kernel_only_demo,17652 bazel-out/darwin_x86_64-opt/bin/pw_kernel/target/mps2_an505/userspace_demo,14532 bazel-out/darwin_x86_64-opt/bin/pw_kernel/target/qemu_virt_riscv32/kernel_only_demo,16684 bazel-out/darwin_x86_64-opt/bin/pw_kernel/target/qemu_virt_riscv32/userspace_demo,13128 After ===== bazel-out/darwin_x86_64-opt/bin/pw_kernel/target/mps2_an505/kernel_only_demo,13548 bazel-out/darwin_x86_64-opt/bin/pw_kernel/target/mps2_an505/userspace_demo,10432 bazel-out/darwin_x86_64-opt/bin/pw_kernel/target/qemu_virt_riscv32/kernel_only_demo,12624 bazel-out/darwin_x86_64-opt/bin/pw_kernel/target/qemu_virt_riscv32/userspace_demo,9080 Change-Id: Ie93cfc52215753e1b4482d5fe3058dc53fcfa86a Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/303372 Commit-Queue: Joshua Liebow-Feeser <joshlf@google.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com> Pigweed-Auto-Submit: Joshua Liebow-Feeser <joshlf@google.com> Docs-Not-Needed: Joshua Liebow-Feeser <joshlf@google.com> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Erik Gilling <konkers@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.