Carlo Cabrera dbeac59584
keg_relocate: retain framework info in relocatable install names
`dyld` uses the target library's install name to work out whether this
is a Framework or a dylib, which affects how `dyld` searches for the
desired library.

We should therefore avoid confusing `dyld` by including the
`*.framework` part of the install name in the target dylib, which is
what this change does.

Here's a concrete example of what this changes. Before:

    ❯ otool -L /usr/local/bin/python3
    /usr/local/bin/python3:
            @loader_path/../Python (compatibility version 3.11.0, current version 3.11.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

After:

    ❯ otool -L /usr/local/bin/python3
    /usr/local/bin/python3:
            @loader_path/../../../../Python.framework/Versions/3.11/Python (compatibility version 3.11.0, current version 3.11.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

By retaining the `Python.framework` part of the install name, we make
sure that `dyld` knows that it should be looking for a framework rather
than a dylib.
2023-08-07 14:43:56 +08:00
..
2023-08-04 10:02:44 +01:00
2023-04-25 09:26:24 -07:00
2023-04-01 18:56:42 -07:00
2021-09-11 01:00:23 +01:00
2023-04-24 20:42:39 -07:00
2023-06-16 10:33:15 +01:00
2020-10-10 14:59:39 +02:00
2023-04-24 20:42:39 -07:00
2023-03-27 20:04:57 -07:00
2023-04-01 18:56:42 -07:00
2023-04-24 20:42:39 -07:00
2022-11-23 20:39:59 -08:00
2023-07-13 20:33:26 +01:00