This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Support Obj-C symbols in order files
ClosedPublic

Authored by int3 on Dec 18 2020, 3:45 PM.

Details

Reviewers
thakis
Group Reviewers
Restricted Project
Commits
rG5f9896d3b23c: [lld-macho] Support Obj-C symbols in order files
Summary

Obj-C symbols may have spaces and colons, which our previous order file
parser would be confused by. The order file format has made the very unfortunate
choice of using colons for its delimiters, which means that we have to use
heuristics to determine if a given colon is part of a symbol or not...

Diff Detail

Event Timeline

int3 created this revision.Dec 18 2020, 3:45 PM
int3 requested review of this revision.Dec 18 2020, 3:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 18 2020, 3:45 PM
int3 updated this revision to Diff 312896.Dec 18 2020, 3:54 PM

line wrapping

int3 added inline comments.Dec 18 2020, 4:01 PM
lld/test/MachO/order-file.s
8

I'm not sure why objdump decided to start printing _bar instead of our foo symbol, but I guess it doesn't really matter (they alias to the same address)

thakis accepted this revision.Dec 20 2020, 6:58 AM
This revision is now accepted and ready to land.Dec 20 2020, 6:58 AM
This revision was landed with ongoing or failed builds.Dec 20 2020, 10:49 AM
This revision was automatically updated to reflect the committed changes.
lld/MachO/Driver.cpp