This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Support absolute symbols
ClosedPublic

Authored by int3 on Sep 18 2020, 8:38 AM.

Details

Reviewers
smeenai
Group Reviewers
Restricted Project
Commits
rG62a3f0c9844b: [lld-macho] Support absolute symbols
Summary

They operate like Defined symbols but with no associated InputSection.

Note that ld64 seems to treat the weak definition flag like a no-op for
absolute symbols, so I have replicated that behavior.

Diff Detail

Event Timeline

int3 created this revision.Sep 18 2020, 8:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 18 2020, 8:38 AM
int3 requested review of this revision.Sep 18 2020, 8:38 AM
smeenai accepted this revision.Sep 22 2020, 12:21 PM
smeenai added a subscriber: smeenai.

LGTM

lld/MachO/Symbols.cpp
18–20

If you don't anticipate the logic here getting more complex, we could just do a one-liner (and potentially move it back to the header).

This revision is now accepted and ready to land.Sep 22 2020, 12:21 PM
int3 marked an inline comment as done.Sep 25 2020, 11:28 AM
This revision was landed with ongoing or failed builds.Sep 25 2020, 11:29 AM
This revision was automatically updated to reflect the committed changes.