[lld] r203328 - Add one more test for r203308.
Rui Ueyama
ruiu at google.com
Fri Mar 7 17:27:22 PST 2014
Author: ruiu
Date: Fri Mar 7 19:27:22 2014
New Revision: 203328
URL: http://llvm.org/viewvc/llvm-project?rev=203328&view=rev
Log:
Add one more test for r203308.
Added:
lld/trunk/test/pecoff/Inputs/merge-same-size3.obj.yaml
Modified:
lld/trunk/test/pecoff/merge-same-size.test
Added: lld/trunk/test/pecoff/Inputs/merge-same-size3.obj.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/Inputs/merge-same-size3.obj.yaml?rev=203328&view=auto
==============================================================================
--- lld/trunk/test/pecoff/Inputs/merge-same-size3.obj.yaml (added)
+++ lld/trunk/test/pecoff/Inputs/merge-same-size3.obj.yaml Fri Mar 7 19:27:22 2014
@@ -0,0 +1,25 @@
+---
+header:
+ Machine: IMAGE_FILE_MACHINE_I386
+ Characteristics: [ ]
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 16
+ SectionData: FFFF
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ NumberOfAuxSymbols: 1
+ AuxiliaryData: 0700000000000000C979F796000003000000
+ - Name: "_foo"
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
Modified: lld/trunk/test/pecoff/merge-same-size.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/merge-same-size.test?rev=203328&r1=203327&r2=203328&view=diff
==============================================================================
--- lld/trunk/test/pecoff/merge-same-size.test (original)
+++ lld/trunk/test/pecoff/merge-same-size.test Fri Mar 7 19:27:22 2014
@@ -1,16 +1,24 @@
# RUN: yaml2obj %p/Inputs/merge-same-size1.obj.yaml > %t1.obj
# RUN: yaml2obj %p/Inputs/merge-same-size2.obj.yaml > %t2.obj
+# RUN: yaml2obj %p/Inputs/merge-same-size3.obj.yaml > %t3.obj
#
# RUN: lld -flavor link /out:%t.exe /subsystem:console /opt:noref /force \
-# RUN: -- %t1.obj %t2.obj 2>&1 > %t.log
+# RUN: -- %t1.obj %t2.obj > %t1.log 2>&1
#
# FileCheck complains if the input files is empty, so add a dummy line.
-# RUN: echo foo >> %t.log
-# RUN: FileCheck -check-prefix=STDERR %s < %t.log
+# RUN: echo foo >> %t1.log
+# RUN: FileCheck -check-prefix=SAMESIZE %s < %t1.log
+#
+# RUN: not lld -flavor link /out:%t.exe /subsystem:console /opt:noref /force \
+# RUN: -- %t1.obj %t3.obj > %t2.log 2>&1
+# RUN: FileCheck -check-prefix=DIFFERENT %s < %t2.log
#
# RUN: llvm-readobj -sections %t.exe | FileCheck -check-prefix=READOBJ %s
-STDERR-NOT: duplicate symbol error
+SAMESIZE-NOT: duplicate symbol error
+
+DIFFERENT: Size mismatch
+DIFFERENT: duplicate symbol error
READOBJ: Format: COFF-i386
READOBJ-NEXT: Arch: i386
More information about the llvm-commits
mailing list