You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
arm: standalone --cortex-m internal calls need direct resolution (no linker) + $t mapping symbols #170
Follow-up to #167 (fixed for the --relocatable path in PR #169).
Standalone --cortex-m direct call resolution
The --relocatable path now emits R_ARM_THM_CALL relocations so the host linker resolves internal BL func_N calls. But a standalone --cortex-m executable has no linker — build_multi_func_cortex_m_elf must resolve internal calls directly by patching the Thumb BL offset at layout time (function addresses are known). Today those calls remain bl #0 placeholders in a standalone image.
Scope: in build_multi_func_cortex_m_elf, after laying out functions, walk each function's BL func_N relocation and patch the encoded Thumb BL displacement (S − P, accounting for the +4 pipeline) in place. The 0xF800 zero-offset encoding from PR #169 is the correct base to patch.
$t / $a / $d mapping symbols
synth's ARM objects emit no mapping symbols, so objdump won't disassemble .text as Thumb (shows .word), and strict consumers may mis-read ARM-vs-Thumb regions. Not required for linking (PR #169 links cleanly without them), but needed for clean disassembly/debug and full ARM-ELF-ABI conformance. Requires emitting a local $t at .text offset 0, which means making the .symtabsh_info (first-global index) dynamic and ordering local symbols before globals in the builder.
Activity
feat(cli): resolve standalone --cortex-m internal calls in place (#170)…
test(cli): locate the BL by scanning, not position (#170 test vs #188)
fix(selector): preserve caller-saved registers across calls (#188) (#194
feat(selector): marshal call arguments into r0-r3 per AAPCS (#195) (#196
fix(selector): spill i64 register pairs + call results under pressure (…