[lld][MachO] Fix function starts section
authorAlexander Shaposhnikov <alexshap@fb.com>
Sat, 12 Jun 2021 00:47:28 +0000 (17:47 -0700)
committerAlexander Shaposhnikov <alexshap@fb.com>
Sat, 12 Jun 2021 00:47:28 +0000 (17:47 -0700)
commitb9095f5e1a7f6f3ee1d741a6931a318da050bed8
tree8e9de91e4e81ccbaff07fe15e3dcb0d79dd012fb
parent5de7467e9821485f492eb97fafd796e1db4c6bb5
[lld][MachO] Fix function starts section

Sort the addresses stored in FunctionStarts section.
Previously we were encoding potentially large numbers (due to unsigned overflow).

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D103662
lld/MachO/SyntheticSections.cpp
lld/MachO/SyntheticSections.h
lld/test/MachO/function-starts.s