This is an archive of the discontinued LLVM Phabricator instance.

[lld/mac] Correctly set nextdefsym
ClosedPublic

Authored by thakis on May 17 2021, 7:30 PM.

Details

Reviewers
int3
gkm
Group Reviewers
Restricted Project
Commits
rGb4ead2c37bcb: [lld/mac] Correctly set nextdefsym
Summary

In LC_DYSYMTAB, private externs were still emitted as exported symbols instead
of as locals.

Fixes PR50373. See bug for details.

Diff Detail

Event Timeline

thakis created this revision.May 17 2021, 7:30 PM
Herald added a reviewer: gkm. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
thakis requested review of this revision.May 17 2021, 7:30 PM
thakis edited the summary of this revision. (Show Details)
int3 added inline comments.May 17 2021, 8:03 PM
lld/MachO/SyntheticSections.cpp
568–569

can we just inline this into a simple check against defined->privateExtern? The assert doesn't seem very useful (we already check it once during InputFile::parseSymbols)

int3 added inline comments.May 17 2021, 8:12 PM
lld/MachO/SyntheticSections.cpp
568–569

(perhaps that change would make more sense as part of D102661)

thakis added inline comments.May 18 2021, 4:43 AM
lld/MachO/SyntheticSections.cpp
568–569

Done as part of D102661.

thakis marked 2 inline comments as done.May 18 2021, 5:08 AM
int3 accepted this revision.May 18 2021, 9:54 AM

Thanks!

This revision is now accepted and ready to land.May 18 2021, 9:54 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2021, 10:54 AM