This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Switch to new tool ID
ClosedPublic

Authored by keith on Jun 14 2023, 8:52 AM.

Details

Reviewers
smeenai
MaskRay
Group Reviewers
Restricted Project
Commits
rG806f5b301966: [lld-macho] Switch to new tool ID
Summary

As of Xcode 15 there is now a tool ID for LLD, likely driven by Apple's
tests with using LLD for their CAS work in clang. This updates LLD to
use the correct ID, and updates the object library so that llvm-objdump
prints it correctly.

Diff Detail

Event Timeline

keith created this revision.Jun 14 2023, 8:52 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 14 2023, 8:52 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
keith requested review of this revision.Jun 14 2023, 8:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2023, 8:52 AM
smeenai accepted this revision.Jun 14 2023, 10:36 AM
smeenai added a subscriber: smeenai.

Neat.

This revision is now accepted and ready to land.Jun 14 2023, 10:36 AM
davide added a subscriber: davide.EditedJun 14 2023, 3:53 PM

As of Xcode 15 there is now a tool ID for LLD, likely driven by Apple's tests with using LLD for their CAS work in clang.

The tool ID is something Apple introduced to stamp in the load command what linker is used to produce the executable, and it's unrelated to the CAS.
That's useful to distinguish between ld(1) -- as provided by Apple and 3rd party linkers. dyld can also parse this field potentially to make the behavior more strict on Apple produced binaries, as other linkers could produce slightly broken (for some definition of broken) binaries that can create binary compatibility problems (e.g. some load commands aren't emitted).

Thanks for adopting. HTH.

MaskRay accepted this revision.Jun 14 2023, 6:41 PM
This revision was automatically updated to reflect the committed changes.