llvm-project/lld/MachO
Nico Weber ed2f0ad307 [lld/mac] Search .tbd before binary for framework files too
This matters for example for the iPhoneSimulator14.0.sdk, which has
a System/Library/Frameworks/UIKit.framework/UIKit that has
LC_BUILD_VERSION with minos of 14.0, so linking against that file
will produce warnings like:

   .../iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit
   has version 14.0.0, which is newer than target minimum of 12.0.0

when targeting x86_64-apple-ios12.0-simulator. That doens't happen when
linking against UIKit.tbd instead, obviously.

Linking with RC_TRACE_DYLIB_SEARCHING=1 shows that ld64 also searches
the tbd file first, and we already get that right for non-framework
dylibs.

Fixes crbug.com/1249456.

Differential Revision: https://reviews.llvm.org/D109768
2021-09-14 15:26:45 -04:00
..
Arch [lld/mac] Set branchRange a bit more carefully 2021-08-30 12:36:06 -04:00
CMakeLists.txt [CMake][gn] lldMachO=>lldMachOOld, lldMachO2=>lldMachO 2021-08-04 18:52:41 -07:00
ConcatOutputSection.cpp [lld/mac] Leave more room for thunks in thunk placement code 2021-08-30 22:09:05 -04:00
ConcatOutputSection.h [lld-macho] Have ICF operate on all sections at once 2021-07-17 13:42:51 -04:00
Config.h [lld/mac] Handle symbols from -U in treatUndefinedSymbol() 2021-07-22 19:43:57 -04:00
Driver.cpp [lld-macho] Have -ObjC load archive members before symbol resolution 2021-08-26 18:52:07 -04:00
Driver.h [lld-macho] Refactor archive loading 2021-08-26 18:52:07 -04:00
DriverUtils.cpp [lld/mac] Search .tbd before binary for framework files too 2021-09-14 15:26:45 -04:00
Dwarf.cpp [lld-macho] Factor out common InputSection members 2021-07-01 21:22:39 -04:00
Dwarf.h [lld-macho] Emit STABS symbols for debugging, and drop debug sections 2020-12-01 15:05:20 -08:00
ExportTrie.cpp [lld-macho][NFC] add const to pointer/reference induction variables of range-based for loops 2021-03-10 12:07:31 -08:00
ExportTrie.h [lld-macho] Export trie addresses should be relative to the image base 2020-09-20 20:43:15 -07:00
ICF.cpp [lld-macho] ICF: Do more work in equalsConstant, less in equalsVariable 2021-07-23 11:49:00 -04:00
ICF.h [lld-macho] Move ICF earlier to avoid emitting redundant binds 2021-07-01 21:22:38 -04:00
InputFiles.cpp [lld-macho] Refactor archive loading 2021-08-26 18:52:07 -04:00
InputFiles.h [lld-macho] Refactor archive loading 2021-08-26 18:52:07 -04:00
InputSection.cpp [lld/mac] Remove "else" after return 2021-07-22 21:31:52 -04:00
InputSection.h [lld-macho][nfc] Clean up InputSection constructors 2021-08-26 19:07:48 -04:00
LTO.cpp [lld-macho] Initialize LTO backend with diagnostic handler 2021-09-04 17:40:07 -04:00
LTO.h [lld-macho] Add LTO cache support 2021-07-15 12:56:13 -04:00
MachOStructs.h [lld-macho] Add support for arm64_32 2021-04-15 21:16:33 -04:00
MapFile.cpp [lld][MachO] Sort symbols in parallel in -map 2021-06-17 10:19:59 +08:00
MapFile.h [lld-macho] implement options -map 2021-03-18 10:39:19 -04:00
MarkLive.cpp [lld/mac] Partially implement -export_dynamic 2021-07-06 11:22:18 -04:00
MarkLive.h [lld/mac] Implement -dead_strip 2021-06-02 11:09:26 -04:00
ObjC.cpp [lld-macho] Refactor archive loading 2021-08-26 18:52:07 -04:00
ObjC.h [lld-macho] Implement -ObjC 2020-08-26 19:20:55 -07:00
Options.td [lld-macho] Optimize bind opcodes with multiple passes 2021-07-15 20:52:46 -07:00
OutputSection.cpp [lld/mac] Implement support for section$start and section$ end symbols 2021-07-23 16:01:09 -04:00
OutputSection.h [lld/mac] Implement support for section$start and section$ end symbols 2021-07-23 16:01:09 -04:00
OutputSegment.cpp [lld/mac] Add support for segment$start$ and segment$end$ symbols 2021-07-25 18:25:13 -04:00
OutputSegment.h [lld/mac] Add support for segment$start$ and segment$end$ symbols 2021-07-25 18:25:13 -04:00
Relocations.cpp [lld-macho][nfc] Remove DYSYM8 reloc attribute 2021-04-09 19:48:08 -04:00
Relocations.h [lld-macho] Add 32-bit compact unwind support 2021-04-15 21:16:33 -04:00
SymbolTable.cpp [lld/mac] Add support for segment$start$ and segment$end$ symbols 2021-07-25 18:25:13 -04:00
SymbolTable.h [lld/mac] Implement -dead_strip 2021-06-02 11:09:26 -04:00
Symbols.cpp [lld-macho] Implement ICF 2021-06-17 10:07:44 -07:00
Symbols.h [lld/mac] Fix bug in interaction of -dead_strip and -undefined dynamic_lookup 2021-07-22 19:30:46 -04:00
SyntheticSections.cpp [lld/mac] Let OutputSegment store its start address 2021-07-23 11:43:25 -04:00
SyntheticSections.h [lld-macho] Have ICF operate on all sections at once 2021-07-17 13:42:51 -04:00
Target.cpp [lld-macho][nfc] Create Relocations.{h,cpp} for relocation-specific code 2021-03-11 13:28:09 -05:00
Target.h [lld/mac] Set branchRange a bit more carefully 2021-08-30 12:36:06 -04:00
UnwindInfoSection.cpp [lld-macho] Fix unwind info personality size 2021-08-26 18:52:06 -04:00
UnwindInfoSection.h [lld/mac] Don't crash when dead-stripping removes all unwind info 2021-07-07 13:05:40 -04:00
Writer.cpp [lld/mac] Don't assert during thunk insertion if there are undefined symbols 2021-09-03 12:22:41 -04:00
Writer.h [lld-macho] Have ICF operate on all sections at once 2021-07-17 13:42:51 -04:00