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

Linker scripts can align to offsets, and require valid alignments #1271

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

Rangi42
Copy link
Contributor

@Rangi42 Rangi42 commented Dec 11, 2023

Fixes #1268
Fixes #1270

@Rangi42 Rangi42 added enhancement Typically new features; lesser priority than bugs rgblink This affects RGBLINK labels Dec 11, 2023
@Rangi42 Rangi42 added this to the v0.7.0 milestone Dec 11, 2023
@Rangi42 Rangi42 requested a review from ISSOtm December 11, 2023 05:27
ISSOtm
ISSOtm previously requested changes Dec 16, 2023
Copy link
Member

@ISSOtm ISSOtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic seems sound, the test case is alright, except for one semantics request and *censored* UB; the documentation is Not Great, but I re-read the entire man page and I think it needs to be overhauled entirely, which I'll thus defer to a later PR for the purpose of scoping.

src/link/script.y Outdated Show resolved Hide resolved
src/link/script.y Outdated Show resolved Hide resolved
Copy link
Member

@ISSOtm ISSOtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, 1u << 16 is UB if unsigned is 16-bit.
I don't feel like picking that particular nit further, though. Thanks!

@ISSOtm ISSOtm merged commit fdd45ab into gbdev:master Dec 18, 2023
23 checks passed
@Rangi42 Rangi42 deleted the align branch December 18, 2023 06:42
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 this pull request may close these issues.

Allow specifying align offsets in a linker script Warn or error if linker script ALIGN is out of range
2 participants