[LLD][COFF] Support /MAPINFO flag
authorPengxuan Zheng <pzheng@quicinc.com>
Tue, 20 Sep 2022 00:21:21 +0000 (17:21 -0700)
committerPengxuan Zheng <pzheng@quicinc.com>
Tue, 20 Sep 2022 21:39:07 +0000 (14:39 -0700)
commit7b31756393ab313857ffe2f8a98cab1bce81fdd8
tree1ebd23d7979fa9f78291122f1409b7b2ddf7c6c2
parentc325e978b529e7e899a31cd2693fbc1a676afcf0
[LLD][COFF] Support /MAPINFO flag

This patch adds support for link.exe's /MAPINFO flag to lld-link.exe.

Here is a description of the flag from Microsoft
(https://learn.microsoft.com/en-us/cpp/build/reference/mapinfo-include-information-in-mapfile?view=msvc-170):

 The /MAPINFO option tells the linker to include the specified information in a
 mapfile, which is created if you specify the /MAP option. EXPORTS tells the
 linker to include exported functions.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D134247
lld/COFF/Config.h
lld/COFF/Driver.cpp
lld/COFF/MapFile.cpp
lld/COFF/Options.td
lld/test/COFF/map.test