Skip to content

Improve checking of invalid symbol versions#1113

Open
parth-07 wants to merge 1 commit into
qualcomm:mainfrom
parth-07:VersionChecks
Open

Improve checking of invalid symbol versions#1113
parth-07 wants to merge 1 commit into
qualcomm:mainfrom
parth-07:VersionChecks

Conversation

@parth-07
Copy link
Copy Markdown
Contributor

This commit improves checking of invalid symbol versions. In particular, we now report errors when:

  • A defined symbol contains an unknown version.
  • An undefined symbol contains a version. Please note that there is no valid case where an undefined symbol can have a symbol version.

Resolves #1094

@quic-areg
Copy link
Copy Markdown
Contributor

The error message undefined symbol 'foo@VER' cannot have version repeats the version since the name already contains @VER. I think these error messages are better:

lld: undefined symbol: foo@VER; gold: symbol foo has undefined version VER

@parth-07
Copy link
Copy Markdown
Contributor Author

The error message undefined symbol 'foo@VER' cannot have version repeats the version since the name already contains @VER. I think these error messages are better:

lld: undefined symbol: foo@VER; gold: symbol foo has undefined version VER

Thank you for the suggestion. You mean the other diagnostic, %0: symbol %1 has undefined version %2, right?
The undefined symbol 'foo@VER' cannot have version was not repeating the version name. Though I was incorrectly passing the redundant version name with the config.raise() which was getting ignored.

I have modified the %0: symbol foo@UNKNOWN_VERSION has undefined version UNKNOWN_VERSION diagnostic to %0: symbol foo has undefined version UNKNOWN_VERSION.

This commit improves checking of invalid symbol versions.
In particular, we now report errors when:
- A defined symbol contains an unknown version.
- An undefined symbol contains a version. Please note that
  there is no valid case where an undefined symbol can have a symbol
  version.

Resolves qualcomm#1094

Signed-off-by: Parth Arora <partaror@qti.qualcomm.com>
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.

.symver to an unknown version with no version script is silently accepted

2 participants