[LLD] [COFF] Make -export-all-symbols work as intended for EXEs
authorMartin Storsjö <martin@martin.st>
Sun, 18 Jul 2021 19:52:32 +0000 (22:52 +0300)
committerMartin Storsjö <martin@martin.st>
Thu, 22 Jul 2021 20:34:03 +0000 (23:34 +0300)
commit9dbc4b09afd4427c2def829f0c8283f732e654a0
tree4ea2acccb80510c65e950e7b53d71722fb7b1981
parenta4a4f602c74f868125773e690005878e79551e39
[LLD] [COFF] Make -export-all-symbols work as intended for EXEs

If some symbols are marked with dllexport, we still want to export
all symbols if -export-all-symbols is specified. Previously, this
only worked as it should for DLL output, not for EXE.

This should fix downstream bug
https://github.com/msys2/MINGW-packages/issues/9163.

Differential Revision: https://reviews.llvm.org/D106245
lld/COFF/Driver.cpp
lld/test/COFF/export-all.s