From 11c45ea0b74f8d2cc97481a95997a07300994809 Mon Sep 17 00:00:00 2001 From: ppannuto-claude Date: Fri, 28 Aug 2026 10:02:50 -0700 Subject: [PATCH] qemu_arm_mps2: note why the _estack extern stays in the chip crate Breaking this rule produces `undefined symbol: _estack.1` attributed to an unrelated line, which gives a reader nothing to go on. Record the cause where the declaration actually lives. Co-Authored-By: Claude Sonnet 5 --- chips/qemu_arm_mps2/src/vectors_m3.rs | 4 ++++ chips/qemu_arm_mps2/src/vectors_m4.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/chips/qemu_arm_mps2/src/vectors_m3.rs b/chips/qemu_arm_mps2/src/vectors_m3.rs index cc6afdcae4..f05cb384a0 100644 --- a/chips/qemu_arm_mps2/src/vectors_m3.rs +++ b/chips/qemu_arm_mps2/src/vectors_m3.rs @@ -13,6 +13,10 @@ use cortexm3::{CortexM3, CortexMVariant, initialize_ram_jump_to_main, unhandled_ extern "C" { // _estack is not really a function, but it makes the types work. // You should never actually invoke it!! + // + // Keep this in the chip crate: `process_console` declares `_estack` as + // data, and LTO can't hold both types in one unit -- it renames ours to + // `_estack.1` and the link then fails, blaming an unrelated line. fn _estack(); } diff --git a/chips/qemu_arm_mps2/src/vectors_m4.rs b/chips/qemu_arm_mps2/src/vectors_m4.rs index b18e2b6c26..e48bbd448c 100644 --- a/chips/qemu_arm_mps2/src/vectors_m4.rs +++ b/chips/qemu_arm_mps2/src/vectors_m4.rs @@ -13,6 +13,10 @@ use cortexm4::{CortexM4, CortexMVariant, initialize_ram_jump_to_main, unhandled_ extern "C" { // _estack is not really a function, but it makes the types work. // You should never actually invoke it!! + // + // Keep this in the chip crate: `process_console` declares `_estack` as + // data, and LTO can't hold both types in one unit -- it renames ours to + // `_estack.1` and the link then fails, blaming an unrelated line. fn _estack(); }