Add support for @loader_path and @executable_path in macOS dylib relinking#2358
Open
Add support for @loader_path and @executable_path in macOS dylib relinking#2358
Conversation
…library refs The resolve_libraries() method only handled @rpath/ and absolute paths when resolving library references. Libraries referenced via @executable_path (common in Ruby .bundle files) or @loader_path were left unresolved, causing the overlinking check to emit false warnings. Now @loader_path is resolved relative to the binary's own directory (same as in resolve_rpath), and @executable_path is resolved by trying bin/ and the prefix root as candidate executable directories. https://claude.ai/code/session_01QNpNnemWFpDFBtgYmU3ZNV
Instead of trying both <prefix>/bin and <prefix>/ as candidate executable directories, only use <prefix>/bin since that is the conventional location for executables in conda prefixes. https://claude.ai/code/session_01QNpNnemWFpDFBtgYmU3ZNV
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.
This PR extends the macOS dylib relinking logic to properly resolve
@loader_pathand@executable_pathreferences, which are common in macOS binaries for specifying library locations relative to the loading binary or executable.