This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Parse re-exports of nested TAPI documents
ClosedPublic

Authored by int3 on Jun 2 2021, 7:55 PM.

Details

Reviewers
thakis
gkm
Group Reviewers
Restricted Project
Commits
rG6881f29a36a9: [lld-macho] Parse re-exports of nested TAPI documents
Summary

D103423 neglected to call parseReexports() for nested TBD
documents, leading to symbol resolution failures when trying to look up
a symbol nested more than one level deep in a TBD file. This fixes the
regression and adds a test.

It also appears that umbrella wasn't being set properly when calling
parseLoadCommands -- it's supposed to resolve to this if nullptr
is passed. I didn't write a failing test case for this but I've made
umbrella a member so the previous behavior should be preserved.

Diff Detail

Event Timeline

int3 created this revision.Jun 2 2021, 7:55 PM
Herald added a project: Restricted Project. · View Herald Transcript
int3 requested review of this revision.Jun 2 2021, 7:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2021, 7:55 PM
int3 planned changes to this revision.Jun 2 2021, 8:07 PM
thakis accepted this revision.Jun 3 2021, 7:45 AM

Whoops!

Thanks for fixing :)

This revision is now accepted and ready to land.Jun 3 2021, 7:45 AM
This revision was landed with ongoing or failed builds.Jun 3 2021, 9:02 AM
This revision was automatically updated to reflect the committed changes.

Shower thought: Does ld64 print these nested docs with -t? It's a separate library, but it's the same file, so it's not 100% clear to me. If it doesn't print them, maybe we should move the note printing back to where it was. (But probably also doesn't matter all that much either way :) )