Skip to content

Conversation

@parth-07
Copy link
Contributor

This commit fixes the parsing / interpretation of "archive:mem" file pattern. Previously, it was getting incorrectly stored because we were not properly handling quotes when a single quoted token in the linker script ("archive:member") is stored as two separate patterns in the linker implementation.

Resolves #680

@parth-07 parth-07 force-pushed the ArchiveMemPattern branch 2 times, most recently from 11b25c9 to 90f1426 Compare December 29, 2025 20:22
This commit fixes the parsing / interpretation of `"archive:mem"` file
pattern. Previously, it was getting incorrectly stored because we were
not properly handling quotes when a single quoted token in the
linker script (`"archive:member"`) is stored as two separate patterns
in the linker implementation.

Resolves qualcomm#680

Signed-off-by: Parth Arora <[email protected]>
// We cannot store the original quote information because we represent
// the single token "archive:mem" in the linker script as two separate
// patterns in the linker codebase.
Tok = unquote(Tok);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use createParserStr to preserve the property that the input token had a quote.

The map file might not show information about quotes from the linker script or the linker script generator too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

createParserStr alone would not be helpful here. We do use createParserStr within createAndRegisterWildcardPattern. The issue is that a single quoted token ("archive:mem") is stored as two separate tokens -- archive file pattern and member pattern -- in the linker codebase. It would be incorrect to store both archive file pattern and the member pattern with quotes if the original combined pattern was with quotes because "archive":"mem" would be interpreted differently from "archive:mem".

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.

"archive:mem" input section description is not interpreted correctly when it is within quotes

2 participants