This is an archive of the discontinued LLVM Phabricator instance.

[lld/mac] Use normal Undefined machinery for dyld_stub_binder lookup
ClosedPublic

Authored by thakis on Jul 11 2021, 9:40 AM.

Details

Summary

This is for aesthetic reasons, I'm not aware of anything that needs
this in practice. It does have a few effects:

  • -undefined dynamic_lookup now has an effect for dyld_stub_binder. This matches ld64.
  • -U dyld_stub_binder now works like you'd expect (it doesn't work in ld64).
  • The error message for a missing dyld_stub_binder symbol now looks like other undefined reference symbols, it changes from
symbol dyld_stub_binder not found (normally in libSystem.dylib). Needed to perform lazy binding.

to

error: undefined symbol: dyld_stub_binder
>>> referenced by lazy binding (normally in libSystem.dylib)

Also add test coverage for that error message.

But in practice, this should have no interesting effects since everything links
in dyld_stub_binder via libSystem anyways.

Diff Detail

Event Timeline

thakis created this revision.Jul 11 2021, 9:40 AM
Herald added a reviewer: gkm. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
thakis requested review of this revision.Jul 11 2021, 9:40 AM
thakis edited the summary of this revision. (Show Details)
thakis edited the summary of this revision. (Show Details)
thakis edited the summary of this revision. (Show Details)
thakis edited the summary of this revision. (Show Details)
thakis edited the summary of this revision. (Show Details)
thakis edited the summary of this revision. (Show Details)
thakis edited the summary of this revision. (Show Details)Jul 11 2021, 9:43 AM
thakis edited the summary of this revision. (Show Details)
thakis edited the summary of this revision. (Show Details)
int3 accepted this revision.Jul 11 2021, 9:45 AM

lgtm

This revision is now accepted and ready to land.Jul 11 2021, 9:45 AM

That was quick, thanks :)

This revision was landed with ongoing or failed builds.Jul 11 2021, 9:49 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2021, 9:49 AM