FEAT: Implemented Linux ELF import symbol versioning#5749
Open
qtxie wants to merge 2 commits into
Open
Conversation
Changed: - system/compiler.r:1972: parses optional @Version refs, keeps versioned imports distinct, and rejects unsupported targets/static imports. - system/formats/ELF.r:71: emits .gnu.version, .gnu.version_r, DT_VERSYM, DT_VERNEED, and DT_VERNEEDNUM for versioned imports. - system/linker.r:265: handles block import keys during import cleanup. - docs/red-system/red-system-specs.txt:3534: documents [@<version>]. - system/tests/source/compiler/regression-test-rsc.r:1598: adds compile coverage for memcpy: "memcpy" @GLIBC_2.14 [...].
dockimbel
reviewed
May 30, 2026
| size [integer!] | ||
| return: [c-string!] | ||
| ] | ||
| memcpy-214: "memcpy" @GLIBC_2.14 [ |
Member
There was a problem hiding this comment.
Does that work if GLIBC 2.14 is not installed?
| ][ | ||
| pos: skip pos 2 | ||
| ] | ||
| ] |
dockimbel
reviewed
May 31, 2026
| #import [ | ||
| "<library>" <convention> [ | ||
| <function name>: "<ID>" [ | ||
| <function name>: "<ID>" [@<version>] [ |
Member
There was a problem hiding this comment.
There's a problem with this syntax. [...] can't be used to denote an optional feature when it's already part of the overall syntax.
dockimbel
reviewed
May 31, 2026
| *The optional symbol version ref is only supported by dynamic Linux ELF | ||
| imports. If it is omitted, the platform dynamic linker resolves the default | ||
| symbol version exported by the shared library. | ||
|
|
Member
There was a problem hiding this comment.
The description should start by explaning clearly what that option does.
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.
Changed: