Skip to content

feat: implement support for the SIZEOF_HEADERS builtin function - #2030

Merged
davidlattimore merged 4 commits into
wild-linker:mainfrom
vishruth-thimmaiah:sizeof_headers
Jun 7, 2026
Merged

davidlattimore merged 4 commits into
wild-linker:mainfrom
vishruth-thimmaiah:sizeof_headers

Conversation

@vishruth-thimmaiah

Copy link
Copy Markdown
Member

This PR adds support for the SIZEOF_HEADERS builtin, which is used to get the combined size of the elf header and program headers.

Comment thread libwild/src/linker_script.rs Outdated
section_layouts: &OutputSectionMap<OutputRecordLayout>,
output_sections: &OutputSections<'data, P>,
resolutions: &[Option<Resolution<P>>],
sizeof_headers: u64,

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.

I feel like at some point soon, we might want to gather up the input data needed to evaluate expressions into a struct. Probably makes sense to do it separately though.

Signed-off-by: vishruth-thimmaiah <vishruththimmaiah@gmail.com>
Signed-off-by: vishruth-thimmaiah <vishruththimmaiah@gmail.com>
Signed-off-by: vishruth-thimmaiah <vishruththimmaiah@gmail.com>
Signed-off-by: Vishruth Thimmaiah <vishruththimmaiah@gmail.com>
@davidlattimore
davidlattimore merged commit 4f93848 into wild-linker:main Jun 7, 2026
25 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.

2 participants