[all-commits] [llvm/llvm-project] 5d9aaf: [lld-macho] Bind re-exported symbols directly to i...
Jez Ng via All-commits
all-commits at lists.llvm.org
Thu Mar 4 11:37:21 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5d9aafc09ab5ddc4c205609e9ea4a8a9fa8186bb
https://github.com/llvm/llvm-project/commit/5d9aafc09ab5ddc4c205609e9ea4a8a9fa8186bb
Author: Jez Ng <jezng at fb.com>
Date: 2021-03-04 (Thu, 04 Mar 2021)
Changed paths:
M lld/MachO/InputFiles.cpp
M lld/test/MachO/implicit-dylibs.s
Log Message:
-----------
[lld-macho] Bind re-exported symbols directly to implicitly-linked umbrellas
Suppose we are linking against libFoo, which re-exports the
implicitly-bound libSystem, which in turn re-exports some
non-explicitly-bound library like `/usr/lib/system/libsystem_c.dylib`.
Then any bindings we have to a symbol in libsystem_c should use
libSystem (and not libFoo) as the umbrella library.
Reviewed By: #lld-macho, smeenai
Differential Revision: https://reviews.llvm.org/D97865
Commit: 8601be809e12a234bbd6264b1a1d37dba2acbe28
https://github.com/llvm/llvm-project/commit/8601be809e12a234bbd6264b1a1d37dba2acbe28
Author: Jez Ng <jezng at fb.com>
Date: 2021-03-04 (Thu, 04 Mar 2021)
Changed paths:
M lld/MachO/InputFiles.cpp
M lld/test/MachO/Inputs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd
R lld/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libReexportSystem.tbd
M lld/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libSystem.tbd
A lld/test/MachO/Inputs/libReexportSystem.tbd
R lld/test/MachO/reexport-nested-lib.s
M lld/test/MachO/stub-link.s
Log Message:
-----------
[lld-macho] Fix & fold reexport-nested-libs test into stub-link.s
The reexport-nested-libs test added in D97438 was a bit wonky.
First, it was linking against libReexportSystem.tbd which targets the
iOS simulator, and which in turn attempted to re-export the iOS
simulator's libSystem. However, due to the way `-syslibroot` works, it
was actually re-exporting the macOS libSystem.
As a result, the test was not actually able to resolve the symbols in
the desired libSystem. I'm guessing that @oontvoo was confused by this
and therefore included those symbols in libReexportSystem.tbd itself.
But this means that the test wasn't actually testing the resolution of
re-exported symbols (though it did at least verify that the re-exported
libraries could be located).
After some consideration, I figured that stub-link.s could be extended
to cover what reexport-nested-libs.s was attempting to do. The test
targets macOS, so we only have one `-syslibroot` and no chance of
confusion.
Reviewed By: #lld-macho, oontvoo
Differential Revision: https://reviews.llvm.org/D97866
Commit: 55a32812fa5ec4d49839ea6f61b50d08a389ab09
https://github.com/llvm/llvm-project/commit/55a32812fa5ec4d49839ea6f61b50d08a389ab09
Author: Jez Ng <jezng at fb.com>
Date: 2021-03-04 (Thu, 04 Mar 2021)
Changed paths:
M lld/MachO/Config.h
M lld/MachO/Driver.cpp
M lld/MachO/InputFiles.cpp
M lld/MachO/LTO.cpp
M lld/MachO/OutputSegment.cpp
M lld/MachO/SyntheticSections.cpp
M lld/MachO/Writer.cpp
A lld/test/MachO/Inputs/libStubLink.tbd
M lld/test/MachO/invalid/Inputs/libincompatible.tbd
R lld/test/MachO/invalid/incompatible-arch-tapi.s
A lld/test/MachO/invalid/incompatible-target-tapi.test
A lld/test/MachO/stub-link-by-arch.s
Log Message:
-----------
[lld-macho] Filter TAPI re-exports by target
Previously, we were loading re-exports without checking whether
they were compatible with our target. Prior to {D97209}, it meant that
we were defining dylib symbols that were invalid -- usually a silent
failure unless our binary actually used them. D97209 exposed this as an
explicit error.
Along the way, I've extended our TAPI compatibility check to cover the
platform as well, instead of just checking the arch. To this end, I've
replaced MachO::Architecture with MachO::Target in our Config struct.
Reviewed By: #lld-macho, oontvoo
Differential Revision: https://reviews.llvm.org/D97867
Commit: 0d4dadc64c4f3e072bf0410dc522e5e1f2731c01
https://github.com/llvm/llvm-project/commit/0d4dadc64c4f3e072bf0410dc522e5e1f2731c01
Author: Jez Ng <jezng at fb.com>
Date: 2021-03-04 (Thu, 04 Mar 2021)
Changed paths:
M lld/MachO/InputFiles.cpp
M lld/test/MachO/invalid/incompatible-target-tapi.test
Log Message:
-----------
[lld-macho] Include install name in error messages for dylibs from TBDs
Since multiple dylibs can be defined in one TBD, this is
necessary to avoid confusion.
Reviewed By: #lld-macho, oontvoo
Differential Revision: https://reviews.llvm.org/D97905
Compare: https://github.com/llvm/llvm-project/compare/db06088d63f8...0d4dadc64c4f
More information about the All-commits
mailing list