[lld] r318637 - COFF: Fix invalid comdat sections in test cases.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 19 21:31:37 PST 2017
Author: pcc
Date: Sun Nov 19 21:31:37 2017
New Revision: 318637
URL: http://llvm.org/viewvc/llvm-project?rev=318637&view=rev
Log:
COFF: Fix invalid comdat sections in test cases.
The comdat sections in these test cases do not comply with the COFF
specification, and link.exe rejects them. I plan to make a change to
how we handle comdat sections which would also cause us to reject them.
Modified:
lld/trunk/test/COFF/include.test
lld/trunk/test/COFF/loadcfg.test
Modified: lld/trunk/test/COFF/include.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/include.test?rev=318637&r1=318636&r2=318637&view=diff
==============================================================================
--- lld/trunk/test/COFF/include.test (original)
+++ lld/trunk/test/COFF/include.test Sun Nov 19 21:31:37 2017
@@ -62,6 +62,19 @@ symbols:
CheckSum: 0
Number: 0
Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: '.text$mn'
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 6
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ Selection: IMAGE_COMDAT_SELECT_ANY
- Name: main
Value: 0
SectionNumber: 1
Modified: lld/trunk/test/COFF/loadcfg.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/loadcfg.test?rev=318637&r1=318636&r2=318637&view=diff
==============================================================================
--- lld/trunk/test/COFF/loadcfg.test (original)
+++ lld/trunk/test/COFF/loadcfg.test Sun Nov 19 21:31:37 2017
@@ -14,10 +14,6 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 4
SectionData: B82A000000C3
- - Name: .text
- Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
- Alignment: 4
- SectionData: B82A000000C3
- Name: .rdata
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
Alignment: 16
@@ -35,19 +31,6 @@ symbols:
NumberOfLinenumbers: 0
CheckSum: 0
Number: 0
- - Name: .text
- Value: 0
- SectionNumber: 2
- SimpleType: IMAGE_SYM_TYPE_NULL
- ComplexType: IMAGE_SYM_DTYPE_NULL
- StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
- Length: 6
- NumberOfRelocations: 0
- NumberOfLinenumbers: 0
- CheckSum: 0
- Number: 0
- Selection: IMAGE_COMDAT_SELECT_ANY
- Name: main
Value: 0
SectionNumber: 1
@@ -56,7 +39,7 @@ symbols:
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
- Name: .rdata
Value: 0
- SectionNumber: 3
+ SectionNumber: 2
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
@@ -68,7 +51,7 @@ symbols:
Number: 3
- Name: _load_config_used
Value: 0
- SectionNumber: 3
+ SectionNumber: 2
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
More information about the llvm-commits
mailing list