Skip to content

fix(runtime/darwin): export _rt_argc/_rt_argv/_rt_envp symbols#316

Merged
octalide merged 1 commit into
devfrom
fix/314-darwin-rt-symbols
Jun 28, 2026
Merged

fix(runtime/darwin): export _rt_argc/_rt_argv/_rt_envp symbols#316
octalide merged 1 commit into
devfrom
fix/314-darwin-rt-symbols

Conversation

@octalide

Copy link
Copy Markdown
Collaborator

Adds the #[symbol(...)] annotations to the darwin runtime startup globals on both arches, mirroring src/runtime/linux/x86_64.mach.

Without the exports, the start inline-asm that stores into _rt_argc / _rt_argv / _rt_envp cannot resolve the symbols and the darwin link fails with undefined symbol: _rt_argc, blocking any mach-built darwin program.

  • src/runtime/darwin/x86_64.mach
  • src/runtime/darwin/aarch64.mach

Parity fix only; no behavioral change on linux. Darwin link advances past this error once applied (per issue verification).

Closes #314

🤖 Generated with Claude Code

the darwin runtime startup globals lacked the #[symbol(...)] annotations
the linux runtime carries, so the start inline-asm storing into them could
not resolve the symbols and the link failed with 'undefined symbol:
_rt_argc'. annotate all three on both darwin arch runtimes, mirroring
src/runtime/linux/x86_64.mach.

Closes #314
@octalide octalide marked this pull request as ready for review June 28, 2026 20:08
@octalide octalide merged commit eac4b3c into dev Jun 28, 2026
2 checks passed
@octalide octalide deleted the fix/314-darwin-rt-symbols branch June 28, 2026 20:12
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

Successfully merging this pull request may close these issues.

runtime/darwin: _rt_argc/_rt_argv/_rt_envp missing #[symbol] annotations — darwin entry fails to link

1 participant