Skip to content

feat: handle output section header start addresses in linker scripts#1850

Merged
lapla-cogito merged 3 commits into
wild-linker:mainfrom
plasmaDestroyer:linker-script-section-header-start-address
Apr 20, 2026
Merged

feat: handle output section header start addresses in linker scripts#1850
lapla-cogito merged 3 commits into
wild-linker:mainfrom
plasmaDestroyer:linker-script-section-header-start-address

Conversation

@plasmaDestroyer

Copy link
Copy Markdown
Contributor

This PR adds support for output section headers that specify a numeric start address between the section name and : in linker scripts, such as __ksymtab 0 : ALIGN(8) { ... }.

It parses and stores that header value, lowers numeric expressions into the existing section location path during linker-script processing, and adds parser and integration test coverage for the new syntax.

Closes #1660.

@plasmaDestroyer plasmaDestroyer force-pushed the linker-script-section-header-start-address branch from d826db6 to 10c79a2 Compare April 18, 2026 01:23

@lapla-cogito lapla-cogito left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, looks good. Could you also update this line in LINKER_SCRIPT_SUPPORT.md? The current implementation only supports numeric literals (which isn't problematic for merging), so "partial" status would be appropriate.

@lapla-cogito

lapla-cogito commented Apr 19, 2026

Copy link
Copy Markdown
Member

It's good to note that only numeric literals are supported in the notes section. (i.e. When the status is "partial," it's not immediately obvious what makes it partial in general.)

@lapla-cogito

Copy link
Copy Markdown
Member

Additionally, this change involves modifying numerous lines in LINKER_SCRIPT_SUPPORT.md. Since these changes may conflict with other currently submitted PRs related to linker script support, please minimize the number of modified lines. In this case, for the documentation, a single line change should suffice.

@plasmaDestroyer

Copy link
Copy Markdown
Contributor Author

Additionally, this change involves modifying numerous lines in LINKER_SCRIPT_SUPPORT.md.

yeah, my bad, my ide had auto formatting on and i didnt realize. fixed it now.

@plasmaDestroyer plasmaDestroyer force-pushed the linker-script-section-header-start-address branch from e411848 to 167de9f Compare April 20, 2026 04:47
@plasmaDestroyer plasmaDestroyer force-pushed the linker-script-section-header-start-address branch from 167de9f to 2111a2c Compare April 20, 2026 04:51

@lapla-cogito lapla-cogito left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@lapla-cogito lapla-cogito merged commit 6a7b16f into wild-linker:main Apr 20, 2026
24 checks passed
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.

Handle numeric address between section name and : in linker scripts

3 participants