Dynamic linking on OS X/macOS is "special" and so are python installations. Each dynamic library has an embedded identifier that typically includes a file path. This is e.g. what the (link) in my ida virtualenv looks like:
$ otool -L python.pmc64
python.pmc64:
@executable_path/plugins/python.pmc64 (compatibility version 1.0.0, current version 1.0.0)
@executable_path/libida64.dylib (compatibility version 1.0.0, current version 1.0.0)
...
/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.1)
python in turn appears to pick up its prefix from where the shared library was loaded from and I have been able to get dyld to load it on demand. Pre-inserting it seems to work though.
Dynamic linking on OS X/macOS is "special" and so are python installations. Each dynamic library has an embedded identifier that typically includes a file path. This is e.g. what the (link) in my
ida
virtualenv looks like:which is supposed to match the dependencies
python
in turn appears to pick up its prefix from where the shared library was loaded from and I have been able to getdyld
to load it on demand. Pre-inserting it seems to work though.