AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

drop unneeded -mlong-calls

Public commit record

What the developer wrote

Authored by Marko Bencun

58/100 · Thin
drop unneeded -mlong-calls

Firmware builds for Cortex-M4 in Thumb mode, where direct BL calls
reach roughly +/-16 MiB. The firmware image is well within that range,
so forcing -mlong-calls only bloats call sites and C code built
through Rust build scripts.

Remove -mlong-calls from the cross-compilation C flags and from
CARGO_C_FLAGS so the compiler can emit direct calls again.

This saves 11432 bytes in firmware.bin.
✓ Descriptive subject✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit removes a compiler flag called -mlong-calls from the firmware build settings. The flag was forcing the compiler to use a larger, longer-range calling convention for function calls, even though the firmware is small enough that the normal direct calling convention works fine. Removing it only reduces code size (saves about 11 KB) and has no security relevance.

Recommended action

No security action required. This is a benign size-optimization build cleanup.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.