fix: import just GLIBC_ABI_DT_RELR version#1826
Merged
davidlattimore merged 2 commits intowild-linker:mainfrom Apr 9, 2026
Merged
fix: import just GLIBC_ABI_DT_RELR version#1826davidlattimore merged 2 commits intowild-linker:mainfrom
GLIBC_ABI_DT_RELR version#1826davidlattimore merged 2 commits intowild-linker:mainfrom
Conversation
Member
|
What about looking up the symbol, then loading the version for that symbol, but not loading the symbol itself? Something like the following: if symbol_db.args.is_relr_enabled()
&& let Some(symbol_id) =
symbol_db.get_unversioned(&UnversionedSymbolName::prehashed(b"GLIBC_ABI_DT_RELR"))
{
let file_id = symbol_db.file_id_for_symbol(symbol_id);
if let layout::FileLayoutState::Dynamic(state) =
&mut groups[file_id.group()].files[file_id.file()]
{
let symbol_index = state.symbol_id_range.id_to_offset(symbol_id);
let version_index = state.object.versym[symbol_index].0.get(LittleEndian);
state.format_specific_state.symbol_versions_needed[version_index as usize - 1] = true;
}
}This could be added somewhere like |
Member
Author
|
I'm going to sleep right now. You can post a new PR or push it here, I don't know how my availability later today (April 9 UTC time) will look like. |
84cc679 to
395f375
Compare
Member
|
I pushed changes along the lines of what I suggested above to this PR |
Member
|
Given that you might have limited availability, I decided to just merge it, since I was happy with the state of it. Hope that's OK. Can always follow-up in a separate PR. |
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.
A self-contained mess to import just the version and not the whole symbol for #1817. If we want to go this route I'll try to clean this up, but there is not much that can be done.