<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/122655>122655</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Current LLD 20 fails to link dependency in liblldMachO.a correctly
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lld
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
lerno
</td>
</tr>
</table>
<pre>
linking liblldMachO.a fails on a vanilla Linux build, with the following code:
```
/usr/bin/ld: /usr/lib/llvm-20/lib/liblldMachO.a(BPSectionOrderer.cpp.o): in function `lld::macho::runBalancedPartitioning(llvm::StringRef, bool, bool, bool, bool)':
(.text._ZN3lld5macho23runBalancedPartitioningEN4llvm9StringRefEbbbb+0x2fc): undefined reference to `lld::BPSectionBase::reorderSectionsByBalancedPartitioning(llvm::StringRef, bool, bool, bool, bool, llvm::SmallVector<std::unique_ptr<lld::BPSectionBase, std::default_delete<lld::BPSectionBase> >, 6u>&)'
```
This first started happening around Dec 19 2024, so is related some change during that time.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysU0uP2zYQ_jXUZVBBHkqyfdDB9q5P2yRoih56WfAxktjSpMrHZvffF1TUTVLAtwCGRY1m5ntIn4jRTI5oYN2ZdQ-VyGn2YbAUnK-k12-DNe5v4yawRlqrfxVq_lgLGIWxEbwDAS_CGWsFPBmXX0FmYzXDC3wxaYY0E4zeWv-lrFBeE-Mn1pxY32y_5sTwmmNgeJXGMbxazfgJ3ovWyPJvX26_YPPt_nsyDA_nT59JJePdx6ApUKjVstSe4bHsMg7G7NbHwPrGrgiMn25Czf7rMWR3FlY4RfqTCMmUXuMmhoeC_LXncwrGTb_RWNRJ7-3965HhfhOKhzrRa6qf__zArdXdCor8DuDjh7YAHt-xHqWUkuG5ecVRbXqy0zQaRxoCjRTIKYLkf5D27sdZRNokki_ebPV4fvuZgi_w3dhNWPsHqeQD45eYNkrZmX8yPS-pVO8QxQu892saRbbpWZOlRPdn-CMw_lhG-7we-s3__31lzen32UQYTYgJYhIhkYZZLAsV4SCCz07DAynYHQEbbFc2HkyEQFaU7uhvBGoWbiLQuZgDaRYJkrlRXemB6yM_ioqG3Z73e-zwwKt5GAk7PHZjv1P7RslxN7Z45IeD7FstVd9WZsAGu2a3Q-TtDnndHtqeq_0oZCN0L_asbegmjK2LybUPU2VizDTsEPuuq6yQZOOaYMTiEmKJchjW1Mg8RdY21sQUvy1IJlkaLjkEcgmenh4Amy3UyUPJPGhayGly6q0k6Mf4Kx8CqWTfqhzsMKe0xPJu8MrwOpk0Z1krf9uC-19-l-D_IpUYXlf6keF1U_Ay4L8BAAD__wNYdZw">