Skip to content

fix: Differentiate between local and global version symbols in linker-diff#1604

Open
levietduc0712 wants to merge 2 commits intodavidlattimore:mainfrom
levietduc0712:differentiate-local-global-version-symbols
Open

fix: Differentiate between local and global version symbols in linker-diff#1604
levietduc0712 wants to merge 2 commits intodavidlattimore:mainfrom
levietduc0712:differentiate-local-global-version-symbols

Conversation

@levietduc0712
Copy link
Contributor

This pull request refines how symbol versions are reported in the read_gnu_version function. Previously, local and global symbols were not differentiated and were both labeled as "local or global". Now, the function distinctly labels version 0 as "local" and version 1 as "global", providing more accurate information.

@levietduc0712 levietduc0712 marked this pull request as draft February 27, 2026 03:46
@davidlattimore
Copy link
Owner

Note that GNU ld recently switched which version index they use for undefined symbols, so you'll possibly see differences in behaviour between different GNU ld versions

@levietduc0712
Copy link
Contributor Author

Based on your note about GNU ld recently switching which version index it uses for undefined symbols, I've reverted the differentiation and instead replaced the old TODO comment with a clearer explanation of why local and global are treated as equivalent since GNU ld's behavior varies across versions, comparing them would produce false positives. What do you think?

@levietduc0712 levietduc0712 force-pushed the differentiate-local-global-version-symbols branch from d225feb to 5d13244 Compare February 27, 2026 04:18
@levietduc0712 levietduc0712 marked this pull request as ready for review February 27, 2026 04:23
@levietduc0712 levietduc0712 changed the title fix: differentiate between local and global version symbols in linker-diff fix: Differentiate between local and global version symbols in linker-diff Feb 27, 2026
@lapla-cogito
Copy link
Collaborator

I believe the original TODO comment better captures the problem's fundamental nature. Additionally, while type annotations have been added, this doesn't actually introduce any meaningful changes.

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.

3 participants