llvm.org GIT mirror llvm / 8235ed1
MC: mark COFF .drectve section as REMOVE The .drectve section should be marked as IMAGE_SCN_LNK_REMOVE. This matches what the MSVC toolchain does and accurately reflects that this section should not be emitted into the final binary. This section is merely information for the linker, comprising of additional linker directives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209273 91177308-0d34-0410-b5e6-96231b3b80d8 Saleem Abdulrasool 6 years ago
2 changed file(s) with 18 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
738738
739739 DrectveSection =
740740 Ctx->getCOFFSection(".drectve",
741 COFF::IMAGE_SCN_LNK_INFO,
741 COFF::IMAGE_SCN_LNK_INFO | COFF::IMAGE_SCN_LNK_REMOVE,
742742 SectionKind::getMetadata());
743743
744744 PDataSection =
0 ; RUN: llc -mtriple i686-windows -filetype obj -o - %s | llvm-readobj -sections \
1 ; RUN: | FileCheck %s
2
3 define dllexport void @function() {
4 entry:
5 ret void
6 }
7
8 ; CHECK: Section {
9 ; CHECK: Name: .drectve
10 ; CHECK: Characteristics [
11 ; CHECK: IMAGE_SCN_ALIGN_1BYTES
12 ; CHECK: IMAGE_SCN_LNK_INFO
13 ; CHECK: IMAGE_SCN_LNK_REMOVE
14 ; CHECK: ]
15 ; CHECK: }
16