COFF: Remove redundant options from tests.
authorRui Ueyama <ruiu@google.com>
Sun, 31 May 2015 04:21:30 +0000 (04:21 +0000)
committerRui Ueyama <ruiu@google.com>
Sun, 31 May 2015 04:21:30 +0000 (04:21 +0000)
llvm-svn: 238670

lld/test/COFF/Inputs/ret42.yaml [new file with mode: 0644]
lld/test/COFF/base.test
lld/test/COFF/heap.test
lld/test/COFF/long-section-name.test
lld/test/COFF/stack.test
lld/test/COFF/version.test

diff --git a/lld/test/COFF/Inputs/ret42.yaml b/lld/test/COFF/Inputs/ret42.yaml
new file mode 100644 (file)
index 0000000..f728a19
--- /dev/null
@@ -0,0 +1,45 @@
+---
+header:
+  Machine:         IMAGE_FILE_MACHINE_AMD64
+  Characteristics: []
+sections:
+  - Name:            '.text$mn'
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    Alignment:       16
+    SectionData:     B82A000000C3
+  - Name:            .data
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+    Alignment:       16
+    SectionData:     ''
+symbols:
+  - Name:            '.text$mn'
+    Value:           0
+    SectionNumber:   1
+    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
+  - Name:            .data
+    Value:           0
+    SectionNumber:   2
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+    SectionDefinition:
+      Length:          0
+      NumberOfRelocations: 0
+      NumberOfLinenumbers: 0
+      CheckSum:        0
+      Number:          0
+  - Name:            mainCRTStartup
+    Value:           0
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
+    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
+...
index b1e3917..4bbae7b 100644 (file)
@@ -1,11 +1,11 @@
-# RUN: lld -flavor link2 /entry:main /out:%t.exe /subsystem:console \
-# RUN:   %p/Inputs/ret42.obj
+# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+
+# RUN: lld -flavor link2 /out:%t.exe %t.obj
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s
 
 DEFAULT: ImageBase: 0x140000000
 
-# RUN: lld -flavor link2 /entry:main /out:%t.exe /subsystem:console \
-# RUN:   /base:0x280000000 %p/Inputs/ret42.obj
+# RUN: lld -flavor link2 /out:%t.exe %t.obj /base:0x280000000
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=BASE %s
 
 BASE: ImageBase: 0x280000000
index c3b1d96..930bc8d 100644 (file)
@@ -1,19 +1,18 @@
-# RUN: lld -flavor link2 /entry:main /subsystem:console /out:%t.exe \
-# RUN:   %p/Inputs/ret42.obj
+# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+
+# RUN: lld -flavor link2 /out:%t.exe %t.obj
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s
 
 DEFAULT: SizeOfHeapReserve: 1048576
 DEFAULT: SizeOfHeapCommit: 4096
 
-# RUN: lld -flavor link2 /entry:main /subsystem:console /out:%t.exe \
-# RUN:   /heap:0x3000 %p/Inputs/ret42.obj
+# RUN: lld -flavor link2 /out:%t.exe /heap:0x3000 %t.obj
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
 
 CHECK1: SizeOfHeapReserve: 12288
 CHECK1: SizeOfHeapCommit: 4096
 
-# RUN: lld -flavor link2 /entry:main /subsystem:console /out:%t.exe \
-# RUN:   /heap:0x5000,0x3000 %p/Inputs/ret42.obj
+# RUN: lld -flavor link2 /out:%t.exe /heap:0x5000,0x3000 %t.obj
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
 
 CHECK2: SizeOfHeapReserve: 20480
index 8158be3..2c0a764 100644 (file)
@@ -1,5 +1,5 @@
-# RUN: yaml2obj %s > %t.obj
-# RUN: lld -flavor link2 /out:%t.exe /subsystem:console %t.obj
+# RUN: yaml2obj %s > %t.obj
+# RUN: lld -flavor link2 /out:%t.exe %t.obj
 # RUN: llvm-readobj -sections %t.exe | FileCheck %s
 
 ---
index 5d55cef..ebf4dab 100644 (file)
@@ -1,19 +1,18 @@
-# RUN: lld -flavor link2 /entry:main /subsystem:console /out:%t.exe \
-# RUN:   %p/Inputs/ret42.obj
+# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+
+# RUN: lld -flavor link2 /out:%t.exe %t.obj
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s
 
 DEFAULT: SizeOfStackReserve: 1048576
 DEFAULT: SizeOfStackCommit: 4096
 
-# RUN: lld -flavor link2 /entry:main /subsystem:console /out:%t.exe \
-# RUN:   /stack:0x3000 %p/Inputs/ret42.obj
+# RUN: lld -flavor link2 /out:%t.exe %t.obj /stack:0x3000
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
 
 CHECK1: SizeOfStackReserve: 12288
 CHECK1: SizeOfStackCommit: 4096
 
-# RUN: lld -flavor link2 /entry:main /subsystem:console /out:%t.exe \
-# RUN:   /stack:0x5000,0x3000 %p/Inputs/ret42.obj
+# RUN: lld -flavor link2 /out:%t.exe %t.obj /stack:0x5000,0x3000
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
 
 CHECK2: SizeOfStackReserve: 20480
index f4a80f2..3ef3ebb 100644 (file)
@@ -1,19 +1,18 @@
-# RUN: lld -flavor link2 /entry:main /subsystem:console /out:%t.exe \
-# RUN:   %p/Inputs/ret42.obj
+# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t.obj
+
+# RUN: lld -flavor link2 /out:%t.exe %t.obj
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=DEFAULT %s
 
 DEFAULT: MajorImageVersion: 0
 DEFAULT: MinorImageVersion: 0
 
-# RUN: lld -flavor link2 /entry:main /subsystem:console /out:%t.exe \
-# RUN:   /version:11 %p/Inputs/ret42.obj
+# RUN: lld -flavor link2 /out:%t.exe %t.obj /version:11
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
 
 CHECK1: MajorImageVersion: 11
 CHECK1: MinorImageVersion: 0
 
-# RUN: lld -flavor link2 /entry:main /subsystem:console /out:%t.exe \
-# RUN:   /version:11.22 %p/Inputs/ret42.obj
+# RUN: lld -flavor link2 /out:%t.exe %t.obj /version:11.22
 # RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
 
 CHECK2: MajorImageVersion: 11