This is an archive of the discontinued LLVM Phabricator instance.

[lld/mac] Add support for segment$start$ and segment$end$ symbols
ClosedPublic

Authored by thakis on Jul 25 2021, 7:19 AM.

Details

Summary

These symbols are somewhat interesting in that they create non-existing
segments, which as far as I know is the only way to create segments
that don't contain any sections.

Final part of part of PR50760. Like D106629, but for segments instead
of sections. I'm not aware of anything that needs this in practice.

Diff Detail

Event Timeline

thakis created this revision.Jul 25 2021, 7:19 AM
Herald added a project: Restricted Project. · View Herald Transcript
int3 accepted this revision.Jul 25 2021, 11:19 AM
int3 added a subscriber: int3.

Nice!

lld/test/MachO/start-end.s
189–198

maybe --implicit-check-not=segment$ would be terser?

399–409

nit: standardize whether we are using # or ##

This revision is now accepted and ready to land.Jul 25 2021, 11:19 AM
This revision was landed with ongoing or failed builds.Jul 25 2021, 3:27 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2021, 3:27 PM
thakis added inline comments.Jul 25 2021, 3:29 PM
lld/test/MachO/start-end.s
189–198

It tests a lot of output. With --implicit-check-not=segment$ it's not always clear where it's supposed to not match when there's a lot of output.

399–409

Done.