This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Don't reference entry symbol for non-executables
ClosedPublic

Authored by int3 on May 9 2021, 1:13 PM.

Details

Reviewers
thakis
Group Reviewers
Restricted Project
Commits
rG0f8854f7f5d3: [lld-macho] Don't reference entry symbol for non-executables
Summary

This would cause us to pull in symbols (and code) that should
be unused.

Diff Detail

Event Timeline

int3 created this revision.May 9 2021, 1:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2021, 1:13 PM
int3 requested review of this revision.May 9 2021, 1:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2021, 1:13 PM
thakis accepted this revision.May 9 2021, 3:43 PM
This revision is now accepted and ready to land.May 9 2021, 3:43 PM
gkm added a subscriber: gkm.May 9 2021, 3:59 PM

LGTM!

lld/MachO/Config.h
76

Nit: The name entry is too generic.

lld/test/MachO/bundle-loader.s
10–12
lld/test/MachO/entry-symbol.s
11–12
int3 marked 2 inline comments as done.May 9 2021, 5:11 PM
int3 added inline comments.
lld/MachO/Config.h
76

the other LLD ports use just entry too

lld/test/MachO/entry-symbol.s
11–12

It's supposed to be aligned to the "SYMBOL TABLE" contents above. The sectname stuff below is from a different part of the objdump output. I'll add a newline to make things clearer

int3 updated this revision to Diff 343940.May 9 2021, 5:11 PM
int3 marked an inline comment as done.
This revision was landed with ongoing or failed builds.May 9 2021, 5:30 PM
This revision was automatically updated to reflect the committed changes.