Skip to content

Conversation

@parth-07
Copy link
Contributor

@parth-07 parth-07 commented Jan 5, 2026

This commit modifies the layout step to reiterate until the section addresses converge. The reiteration has an upper limit of 4. On reaching this limit, a warning is emitted and the layout reiteration is stopped.

Please note that this reiteration limit is for layout iterations before relaxations take place. After a layout relaxation pass, the reiteration count is reset to 0.

Resolves #687

@parth-07 parth-07 force-pushed the SectionAddressConvergence branch 5 times, most recently from 81a1a0b to 7b61c10 Compare January 7, 2026 09:58
@parth-07 parth-07 force-pushed the SectionAddressConvergence branch from 7b61c10 to 2d6821f Compare January 8, 2026 12:30
@partaror partaror force-pushed the SectionAddressConvergence branch from 2d6821f to 93a16f2 Compare January 9, 2026 10:30
Copy link
Contributor

@quic-seaswara quic-seaswara left a comment

Choose a reason for hiding this comment

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

Why are you exposing maxPreRelaxationPasses to the function ?

I feel createProgramHeaders is becoming overly iterative.

The logic can be contained in GNULDBackend.

@parth-07
Copy link
Contributor Author

Why are you exposing maxPreRelaxationPasses to the function ?

We need to use maxPreRelaxationPasses in createProgramHdrsandcreateScriptProgramHdrs` function to determine
the number of times the layout needs to be computed when it is not getting converged.

I feel createProgramHeaders is becoming overly iterative.
The logic can be contained in GNULDBackend.

To push the logic in GNULDBackend, we will need to refactor createProgramHdrs and createScriptProgramHdrs so that
we can run the inner loop of these functions directly from GNULDBackend. However, in our offline discussions, you told not
to refactor those functions as of now as that will increase the testing requirement.

@parth-07 parth-07 force-pushed the SectionAddressConvergence branch from 93a16f2 to 42473f8 Compare January 14, 2026 05:47
This commit modifies the layout step to reiterate until the section
addresses converge. The reiteration has an upper limit of 4. On
reaching this limit, a note is emitted and the layout reiteration
is stopped. It is not warning as of now because it can cause link
failure when --fatal-warnings is used. This note will later be converted
to a warning once the feature is complete.

Please note that this reiteration limit is for layout
iterations before relaxations take place. After a layout relaxation
pass, the reiteration count is reset to 0.

Resolves qualcomm#687

Signed-off-by: Parth Arora <partaror@qti.qualcomm.com>
@parth-07 parth-07 force-pushed the SectionAddressConvergence branch from 42473f8 to 485a38d Compare January 14, 2026 06:24
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.

Incorrect layout when there is a forward reference in a dot assignment

2 participants