Skip to content

Linker overhaul#1

Draft
Vigintillionn wants to merge 24 commits into
mainfrom
feat/linker/main
Draft

Linker overhaul#1
Vigintillionn wants to merge 24 commits into
mainfrom
feat/linker/main

Conversation

@Vigintillionn

@Vigintillionn Vigintillionn commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Rewrite the linker to be cleaner, allow support for .equ with expressions, for custom sections and for linking multiple files. Goal is to be GAS compliant.

  • Fix the layout/resolution desync
  • Introduce a real symbol model
  • Expression layer
  • Generalized sections + remaining directives
  • .include preprocessing layer
  • Object-file split + multi-file linker

Current limitations:

  • No user-facing %hi/%lo/%pcrel_* relocation syntax
  • .equ/.space/.align and .-in-those-contexts cannot reference forward symbols
  • A .equ evaluated during the walk that references a .bss label captures its pre-shift (relative) offset
  • li rd, SYMBOL with a value that needs lui+addi is still a single addi

@Vigintillionn Vigintillionn self-assigned this Jun 7, 2026
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.

1 participant