[lld/mac] Add support for segment$start$ and segment$end$ symbols
authorNico Weber <thakis@chromium.org>
Fri, 23 Jul 2021 14:12:55 +0000 (10:12 -0400)
committerNico Weber <thakis@chromium.org>
Sun, 25 Jul 2021 22:25:13 +0000 (18:25 -0400)
commit80caa1eb4a0eab61debdcda515d00461a20520a6
tree11d44fea974f1a5156e87a383fe1c48dc64c8229
parentafdeb432f0a1e10257862e4a047fc32458f4c124
[lld/mac] Add support for segment$start$ and segment$end$ symbols

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.

Differential Revision: https://reviews.llvm.org/D106767
lld/MachO/OutputSegment.cpp
lld/MachO/OutputSegment.h
lld/MachO/SymbolTable.cpp
lld/MachO/Writer.cpp
lld/test/MachO/start-end.s