-
-
Notifications
You must be signed in to change notification settings - Fork 74
obtain verdefnum from verdef section header #1041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
f0ebd3b to
f1e6437
Compare
davidlattimore
approved these changes
Aug 13, 2025
Similarly to davidlattimore#611 Rust's ELF raw-dylibs do not contain the information about verdef count. This goes against LSB, but all the other linkers can handle it, presumably by using `st_info` of`.gnu.version_d` section. I'm not sure if this is the right thing to do, maybe `sh_info` should be used just as a fallback when `.dynamic` doesn't have `DT_VERDEFNUM` tag? On current main `tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs` fails with: ``` wild: error: Failed to load symbols from `/tmp/rustcnCgdWG/raw-dylibs/lib105m6f543m4qw1t7khnttg751.so` Caused by: Invalid version index 1 ```
f1e6437 to
d6fa3e1
Compare
mati865
added a commit
to mati865/rust
that referenced
this pull request
Aug 24, 2025
Previously it indicated a single version, regardless of their count. Observed in: davidlattimore/wild#1041
mati865
added a commit
to mati865/rust
that referenced
this pull request
Aug 24, 2025
Previously it indicated a single version, regardless of their count. Observed in: davidlattimore/wild#1041
mati865
added a commit
to mati865/rust
that referenced
this pull request
Aug 24, 2025
Previously it indicated a single version, regardless of their count. Observed in: davidlattimore/wild#1041
mati865
added a commit
to mati865/rust
that referenced
this pull request
Aug 24, 2025
Previously it indicated a single version, regardless of their count. Observed in: davidlattimore/wild#1041
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 24, 2025
raw-dylib-elf: set correct `DT_VERDEFNUM` Previously it indicated a single version, regardless of their count. Observed in: davidlattimore/wild#1041
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 24, 2025
raw-dylib-elf: set correct `DT_VERDEFNUM` Previously it indicated a single version, regardless of their count. Observed in: davidlattimore/wild#1041
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Aug 25, 2025
raw-dylib-elf: set correct `DT_VERDEFNUM` Previously it indicated a single version, regardless of their count. Observed in: davidlattimore/wild#1041
rust-timer
added a commit
to rust-lang/rust
that referenced
this pull request
Aug 25, 2025
Rollup merge of #145820 - mati865:raw-elf-verdefnum, r=bjorn3 raw-dylib-elf: set correct `DT_VERDEFNUM` Previously it indicated a single version, regardless of their count. Observed in: davidlattimore/wild#1041
|
FWIW this has been fixed in upstream Rust: rust-lang/rust#145820 |
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Sep 8, 2025
raw-dylib-elf: set correct `DT_VERDEFNUM` Previously it indicated a single version, regardless of their count. Observed in: davidlattimore/wild#1041
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.
Similarly to #611 Rust's ELF raw-dylibs do notcontain the information about verdef count.
This goes against LSB, but all the other linkers can handle it, presumably by using
st_infoof.gnu.version_dsection.I'm not sure if this is the right thing to do, maybe
sh_infoshould be used just as a fallback when.dynamicdoesn't haveDT_VERDEFNUMtag?On current main
tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rsfails with: