__mh_execute_header atoms should be global and never dead strippped.
authorPete Cooper <peter_cooper@apple.com>
Tue, 2 Feb 2016 22:19:01 +0000 (22:19 +0000)
committerPete Cooper <peter_cooper@apple.com>
Tue, 2 Feb 2016 22:19:01 +0000 (22:19 +0000)
commit3a92c35539bd729e12bed95c65c2878f7fb93983
treeb478fe5c37dc3eaf23268c13e5b3bf7bb5047499
parent14a9c07fbfb5e47792e3aa4dd53ba77e2e628ffd
__mh_execute_header atoms should be global and never dead strippped.

In r259574 I fixed some of the issues with the mach header symbols
and DSO handles.

This is the next issue whereby the __mh_execute_header has to not
be dead stripped, and (to match ld64) should be dynamically referenced.

The test here should also have been added in r259574 to make sure that
we emit this symbol.  But checking that it is not only emitted but also
has the correct reference type is fine.

llvm-svn: 259589
lld/lib/ReaderWriter/MachO/ExecutableAtoms.h
lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
lld/test/mach-o/hello-world-x86_64.yaml