Make version script pattern matching GNU-compatible#1151
Open
parth-07 wants to merge 1 commit into
Open
Conversation
c4d2c69 to
5c4474a
Compare
quic-seaswara
approved these changes
May 8, 2026
b121455 to
437c734
Compare
This commit makes version script pattern matching GNU-compatible. Uptil now, eld version script pattern matching was very intuitive, and straightforward. Iterate the version nodes and blocks in order and match them with the global symbols, and the first match wins. However, GNU version script pattern matching rules are a little complex. The updated GNU-compatible version script pattern matching follows the below rules: 1) Phase 1: Iterate the version nodes and blocks in order, match symbols with the non-wildcard patterns. The first match wins. 2) Phase 2: Iterate the version nodes and blocks in order, match unmatched symbols with the non-* wildcard patterns. The last match wins. 3) Phase 3: Iterate the version nodes and blocks in order, match unmatched symbols with the '*' wildcard pattern. The last match wins. Resolves qualcomm#1132 Signed-off-by: Parth Arora <partaror@qti.qualcomm.com>
437c734 to
39530bb
Compare
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.
This commit makes version script pattern matching GNU-compatible. Uptil now, eld version script pattern matching was very intuitive, and straightforward. Iterate the version nodes and blocks in order and match them with the global symbols, and the first match wins. However, GNU version script pattern matching are a little complex. The updated version script pattern matching follows the below rules:
with the non-wildcard patterns. The first match wins.
unmatched symbols with the non-* wildcard patterns. The last match wins.
unmatched symbols with the '*' wildcard pattern. The last match wins.
Resolves #1132