Skip to content

RGBLINK is not compliant with the sym file spec #1076

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

Closed
evie-calico opened this issue Sep 30, 2022 · 4 comments · Fixed by #1078
Closed

RGBLINK is not compliant with the sym file spec #1076

evie-calico opened this issue Sep 30, 2022 · 4 comments · Fixed by #1078
Assignees
Labels
enhancement Typically new features; lesser priority than bugs rgblink This affects RGBLINK
Milestone

Comments

@evie-calico
Copy link
Contributor

evie-calico commented Sep 30, 2022

Spec: https://rgbds.gbdev.io/sym/
Parser: https://docs.rs/gb-sym-file/latest/gb_sym_file/

! is not allowed in symfiles according to the spec, but is used for anonymous labels. @ISSOtm suggested not outputting anything for anonymous labels.

@Rangi42 Rangi42 added this to the 0.6.0 milestone Sep 30, 2022
@Rangi42 Rangi42 added enhancement Typically new features; lesser priority than bugs rgblink This affects RGBLINK labels Sep 30, 2022
@ISSOtm ISSOtm changed the title RGBLINK is not complaint to the symfile spec RGBLINK is not compliant to the symfile spec Sep 30, 2022
@ISSOtm
Copy link
Member

ISSOtm commented Sep 30, 2022

Not emitting anonymous labels is tricky without support from RGBLINK, since they must be emitted by RGBASM to be linkable. (Hence the unique names to begin with.)

It's possible to instead skip emitting symbols whose first character is non-conformant (note that the rest can and should simply use \u escapes), I'm just not sure if that's desirable.

@Rangi42
Copy link
Contributor

Rangi42 commented Sep 30, 2022

I assumed this would be a feature of rgblink only, since it outputs the .sym files. That spec does not apply to the object files that rgbasm outputs; their labels can include whatever weird characters.

@ISSOtm
Copy link
Member

ISSOtm commented Sep 30, 2022

I was considering whether there was a way to avoid changing RGBLINK, but it seems like this is not a possibility.

@Rangi42 Rangi42 changed the title RGBLINK is not compliant to the symfile spec Anonymous labels are not compliant with the symfile spec Sep 30, 2022
@ISSOtm ISSOtm changed the title Anonymous labels are not compliant with the symfile spec RGBLINK is not compliant with the sym file spec Sep 30, 2022
@ISSOtm
Copy link
Member

ISSOtm commented Sep 30, 2022

Actually, RGBLINK in its entirety is not compliant: not only does it allow symbols beginning with illegal letters, it also emits illegal characters as-is instead of \u sequences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Typically new features; lesser priority than bugs rgblink This affects RGBLINK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants