Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make RGBLINK usable in a C toolchain #1008

Open
1 of 6 tasks
ISSOtm opened this issue Jul 11, 2022 · 4 comments
Open
1 of 6 tasks

Make RGBLINK usable in a C toolchain #1008

ISSOtm opened this issue Jul 11, 2022 · 4 comments
Assignees
Labels
docs This affects the documentation (web-specific issues go to rgbds-www) enhancement Typically new features; lesser priority than bugs rgblink This affects RGBLINK

Comments

@ISSOtm
Copy link
Member

ISSOtm commented Jul 11, 2022

More needs to be done for RGBLINK to become a viable C toolchain linker, in order of importance:

  • Linker script must be able to specify floating sections (SDCC "floating" areas do not convey any "type" info, so the linker script must specify whether they are ROM0, ROMX, etc. but that shouldn't force their location.)
  • Linker script must be able to specify "optional" sections (i.e. reference sections but not error out if they don't exist)
  • .cdb support
  • Document how the SDCC and RGBDS worlds interact
  • .lib support (ar archives, and lazily linking .os from those)
  • .noi support (essentially .sym with a different format)
@Rangi42 Rangi42 added the rgblink This affects RGBLINK label Aug 27, 2022
@Rangi42 Rangi42 added enhancement Typically new features; lesser priority than bugs docs This affects the documentation (web-specific issues go to rgbds-www) labels Nov 21, 2023
@Rangi42
Copy link
Contributor

Rangi42 commented Dec 1, 2023

Blocked by #1258

@Rangi42
Copy link
Contributor

Rangi42 commented Dec 12, 2023

The goal is to implement floating and optional linker script sections for 0.7.0. (See the discussion starting in #rgbds-dev.)

@ISSOtm
Copy link
Member Author

ISSOtm commented Dec 16, 2023

I think we should have both ROMX FLOATING for "floating bank", and ROMX 42 \n FLOATING for "floating address" (mirroring ORG's usage), so that the two feature sets are orthogonal. (I don't like just ROMX making the bank floating, I think it's too easy for it to be a mistake, especially for auto-generated scripts.)

@ISSOtm
Copy link
Member Author

ISSOtm commented Dec 17, 2023

The semantics of ROMX FLOATING actually kind of suck, because then all assignments in the section have to start somewhere. More useful semantics would be obtained by instead placing all "fully constrained" sections from the object files, processing the linker script (and FLOATING sections would be immediately placed wherever available), and then running the full placement routine with everything remaining.

But that's a lot more work, so I'd like to defer the implementation of that to a later version (probably in the Rust port anyway lolololo) and "only" implement FLOATING addresses. That would significantly hinder integrations, but I think it should enable some early but nonetheless valuable experimentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This affects the documentation (web-specific issues go to rgbds-www) enhancement Typically new features; lesser priority than bugs rgblink This affects RGBLINK
Projects
None yet
Development

No branches or pull requests

2 participants