Skip to content

Conversation

@mati865
Copy link
Collaborator

@mati865 mati865 commented Aug 12, 2025

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_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

@mati865 mati865 force-pushed the push-ktnszuzlsztw branch 2 times, most recently from f0ebd3b to f1e6437 Compare August 13, 2025 00:02
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
```
@mati865 mati865 force-pushed the push-ktnszuzlsztw branch from f1e6437 to d6fa3e1 Compare August 13, 2025 06:58
@mati865 mati865 merged commit 5f5c1a4 into davidlattimore:main Aug 13, 2025
23 checks passed
@mati865 mati865 deleted the push-ktnszuzlsztw branch August 13, 2025 07:01
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
@mati865
Copy link
Collaborator Author

mati865 commented Aug 25, 2025

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants