[lld/mac] Honor REFERENCED_DYAMICALLY, set it on __mh_execute_header
authorNico Weber <thakis@chromium.org>
Mon, 17 May 2021 13:15:39 +0000 (09:15 -0400)
committerNico Weber <thakis@chromium.org>
Mon, 17 May 2021 18:22:12 +0000 (14:22 -0400)
commit4a12248ee27631c86c2c29d203b22599339ced92
tree50210ebfe343d623985716cc051196306d53fd68
parent648f34a2840b75f4081884052f2ccb11f62f8209
[lld/mac] Honor REFERENCED_DYAMICALLY, set it on __mh_execute_header

Has the effect that `__mh_execute_header` stays in the symbol table of
outputs even after running `strip` on the output. I don't know if that's
important for anything -- my motivation for the patch is just is to make
the output more similar to ld64.

(Corresponds to symbolTableInAndNeverStrip in ld64.)

Differential Revision: https://reviews.llvm.org/D102619
lld/MachO/Driver.cpp
lld/MachO/InputFiles.cpp
lld/MachO/MergedOutputSection.cpp
lld/MachO/SymbolTable.cpp
lld/MachO/SymbolTable.h
lld/MachO/Symbols.h
lld/MachO/SyntheticSections.cpp
lld/MachO/UnwindInfoSection.cpp
lld/test/MachO/referenced-dynamically.s [new file with mode: 0644]
lld/test/MachO/stabs.s
lld/test/MachO/symtab.s