[MC][COFF] Add COFF section flag "Info"
authorchenglin.bi <chenglin.bi@linaro.org>
Wed, 19 Oct 2022 02:32:32 +0000 (10:32 +0800)
committerchenglin.bi <chenglin.bi@linaro.org>
Wed, 19 Oct 2022 02:32:58 +0000 (10:32 +0800)
commitb18293edc39f216339c64dccc6c9abf9eb1aab11
tree8875bf7ad9081b41a2319096a81a2aed50683734
parent771aee91c85b15bb854f4811822d6bb74107bb2e
[MC][COFF] Add COFF section flag "Info"

For now, we have not parse section flag `Info` in asm file. When we emit a section with info flag to asm, then compile asm to obj we will lose the Info flag for the section.
The motivation of this change is ARM64EC's hybmp$x section. If we lose the Info flag MSVC link will report a warning:
`warning LNK4078: multiple '.hybmp' sections found with different attributes`

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D136125
llvm/lib/MC/MCParser/COFFAsmParser.cpp
llvm/lib/MC/MCSectionCOFF.cpp
llvm/test/CodeGen/ARM/global-merge-dllexport.ll
llvm/test/MC/COFF/linker-options.ll
llvm/test/MC/COFF/section.s