Where is the source code for ld-pr… | Apple Developer Forums
Where is the source code for ld-prime? App & System Services Core OS macOS Command Line Tools Linker You’re now watching this thread. If you’ve opted in to email or web notifications, you’ll be notified when there’s activity. Click again to stop watching or visit your profile to manage watched threads and notifications. You’ve stopped watching this thread and will no longer receive emails or web notifications when there’s activity.
Click again to start watching. heresjackie OP Created Apr ’24 Replies 2 Boosts 1 Views 2.3k Participants 3 I am wondering where the source code of ld-prime is on Github. There are references to it in the github for dyld, but I can't find it anywhere. I have a suspicion that it uses LLVM for linking. I'm looking out of curiosity to see if Apple is slowly closing down its compile toolchain and maybe learn how Apple sped up the linking stage.
Replies 2 Boosts 1 Views 2.3k Participants 3 keith OP May ’24 Apple has not released the source to ld-prime. Apple has updated the ld64 source dumps on github and opensource.apple.com a few times since and they do not contain ld-prime source code. Hopefully they release it eventually! Add comment GeorgiDzha OP May ’24 As the Eskimo said , this isn't separate tool. ld_prime — This was introduced with Xcode 15. This isn’t a separate tool.
Rather, ld now supports the -ld_classic and -ld_new options to select a specific implementation I have xcode 15.1 and I called the ld command with the -ld_new -v option and saw the following line: PROGRAM:ld PROJECT:dyld-1022.1 , then I called ld with the -ldclassic -v options and saw @(#)PROGRAM:ld-classic PROJECT:ld64-907 . Therefore, I assumed that these utilities belong to the corresponding open source projects dyld for the new linker and ld64 for the old linker.
Then I tried to find the source code of the new linker in the dyld project, i cloned repo and opened the xcode project, but found only the target and the missing ld source files. It may be necessary to prepare a project, but I haven't figured out how yet Add comment