This is an archive of the discontinued LLVM Phabricator instance.

[lld/mac] Resolve defined symbols before undefined symbols
ClosedPublic

Authored by thakis on Jul 19 2021, 11:41 AM.

Details

Summary

Ports https://reviews.llvm.org/D95985 to the MachO port.
Happens to fix PR51135; see that bug for details.
Also makes lld's behavior match ld64 for the included test case.

Diff Detail

Event Timeline

thakis created this revision.Jul 19 2021, 11:41 AM
Herald added a project: Restricted Project. · View Herald Transcript
thakis requested review of this revision.Jul 19 2021, 11:41 AM
thakis updated this revision to Diff 359871.Jul 19 2021, 12:00 PM

forgot to amend local test change to final commit

(i verified that the test fails without the code change)

thakis edited the summary of this revision. (Show Details)Jul 19 2021, 12:02 PM
int3 accepted this revision.Jul 19 2021, 1:21 PM
int3 added a subscriber: int3.

Nice!

lld/MachO/InputFiles.cpp
602

nit: how about undefineds?

This revision is now accepted and ready to land.Jul 19 2021, 1:21 PM
thakis marked an inline comment as done.Jul 19 2021, 1:41 PM

Thanks!

lld/MachO/InputFiles.cpp
602

Sure, done.

This revision was landed with ongoing or failed builds.Jul 19 2021, 1:41 PM
This revision was automatically updated to reflect the committed changes.
thakis marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald Transcript