Repository navigation
[ELD] Avoid assigning addresses to headers outside the layout - #2065
Merged
Shankar Easwaran (quic-seaswara) merged 1 commit intoOct 8, 2026
Merged
Shankar Easwaran (quic-seaswara) merged 1 commit into
Shankar Easwaran (quic-seaswara) merged 1 commit into
Conversation
Signed-off-by: yashwant <ranayash2022@gmail.com>
Yashwant (yashwant938)
requested a review
from Shankar Easwaran (quic-seaswara)
as a code owner
October 5, 2026 15:54
Shankar Easwaran (quic-seaswara)
approved these changes
Oct 7, 2026
Shankar Easwaran (quic-seaswara)
merged commit Oct 8, 2026
809e131
into
qualcomm:main
14 of 15 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix a crash when a linker script loads PHDRS without FILEHDR and there is room for the headers before the first output section.
allocateHeaders()tries to set the ELF header's physical address even though that header has no output section. FILEHDR without PHDRS has the symmetric problem.Guard each header's address assignment with its existing layout predicate. Add a regression covering both combinations and checking the resulting load-segment offsets and addresses, with explicit section placement and page alignment for consistent results across targets.
Validation: built ELD against LLVM main with assertions enabled; ran the new regression and surrounding PHDRS/header-placement tests across x86-64, Hexagon, AArch64, ARM, RV32, and RV64. 164 test runs passed, with 10 expected unsupported skips. The full upstream suite was not run.
Fixes #2063