ld: support -dynamic_lookup_library#1
Open
mathstuf wants to merge 1 commit intoapple-opensource:masterfrom
Open
ld: support -dynamic_lookup_library#1mathstuf wants to merge 1 commit intoapple-opensource:masterfrom
mathstuf wants to merge 1 commit intoapple-opensource:masterfrom
Conversation
mathstuf
commented
Jun 3, 2020
| if ( dylib != NULL ) { | ||
| // Handle -dynamic_lookup_library | ||
| if ( dylib->forcedDynamicLookupLinked() ) | ||
| return BIND_SPECIAL_DYLIB_FLAT_LOOKUP; |
Author
There was a problem hiding this comment.
There is also BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE. However, I suspect this is more geared towards the case where the symbols are actually in the main executable which is not the case for the libpython use case.
Author
|
@Bigcheese Bruno and I talked about this in Kona 2019, but I can't seem to find his GitHub handle. |
e7f03bb to
6c0052c
Compare
ebc627b to
c754c2b
Compare
|
I don't think Apple pays attention to github pull requests, so I filed FB10995337 in their bugtracker. |
This causes all symbols found in the specified library to be looked up at load time. The library itself is not linked by the output library at all. The main use case for this is creating compiled modules for dynamic languages (e.g., Ruby or Python) where the application loading the module provides the interpreter's symbols. This allows the compiled module to be agnostic to the installation of the interpreter. That is, it can link against the Apple-provided Python, but be run with an Anaconda-provided interpreter.
c754c2b to
659e8e8
Compare
Author
|
Updated to actually compile based on testing within the |
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 causes all symbols found in the specified library to be looked up
at load time. The library itself is not linked by the output library at
all.
The main use case for this is creating compiled modules for dynamic
languages (e.g., Ruby or Python) where the application loading the
module provides the interpreter's symbols. This allows the compiled
module to be agnostic to the installation of the interpreter. That is,
it can link against the Apple-provided Python, but be run with an
Anaconda-provided interpreter.