[yaml2obj] Updating LLD tests to account for LLVM r273915

This removed the -format flag from yaml2obj in favor of YAML tags.

llvm-svn: 273920
This commit is contained in:
Chris Bieneman 2016-06-27 20:17:08 +00:00
parent 6f2ec8104a
commit ca5170e3e4
63 changed files with 66 additions and 63 deletions

View File

@ -1,4 +1,4 @@
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_ARMNT
Characteristics: []

View File

@ -1,4 +1,4 @@
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -1,4 +1,4 @@
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -1,4 +1,4 @@
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: []

View File

@ -1,4 +1,4 @@
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -1,4 +1,4 @@
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -1,4 +1,4 @@
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -1,4 +1,4 @@
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -1,4 +1,4 @@
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -1,4 +1,4 @@
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: []

View File

@ -1,4 +1,4 @@
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -10,7 +10,7 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: lld-link /entry:foo /subsystem:console /out:%t.exe %t.obj
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -6,7 +6,7 @@
# CHECK-NOT: .lib
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]

View File

@ -25,7 +25,7 @@
# AFTER: 1010: 01 30 adds r0, #1
# AFTER: 1012: bd e8 00 88 pop.w {r11, pc}
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_ARMNT
Characteristics: [ ]

View File

@ -18,7 +18,7 @@
# AFTER: 1004: 20 20 movs r0, #32
# AFTER: 1006: ff f7 fb bf b.w #-10
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_ARMNT
Characteristics: []

View File

@ -10,7 +10,7 @@
# CHECK: Symbol: function (0)
# CHECK: }
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_ARMNT
Characteristics: [ ]

View File

@ -19,7 +19,7 @@
# AFTER: 1008: c0 f2 40 00 movt r0, #64
# AFTER: 100c: 70 47 bx lr
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_ARMNT
Characteristics: [ ]

View File

@ -15,7 +15,7 @@
# AFTER: 4: c0 f2 40 00 movt r0, #64
# AFTER: 8: 70 47 bx lr
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_ARMNT
Characteristics: [ ]

View File

@ -16,7 +16,7 @@
# BASE-TEXT: Contents of section .text:
# BASE-TEXT-NEXT: 1000 00000080 02000000
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -72,7 +72,7 @@
# BASEREL-HEADER-NEXT: IMAGE_SCN_MEM_READ (0x40000000)
# BASEREL-HEADER-NEXT: ]
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -9,7 +9,7 @@
# CHECK: 300f: b8 60 10 00 40
# CHECK: 3014: b8 80 10 00 40
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -10,7 +10,7 @@
# CHECK: duplicate symbol: foo {{.+}}1.obj and foo {{.+}}2.obj
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -1,7 +1,7 @@
# RUN: yaml2obj %s > %t.obj
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console %t.obj
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -19,7 +19,7 @@
# WINMAIN: <root>: undefined symbol: WinMainCRTStartup
# WWINMAIN: <root>: undefined symbol: wWinMainCRTStartup
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -4,7 +4,7 @@
# CHECK: Entry name inferred: WinMainCRTStartup
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -4,7 +4,7 @@
# CHECK: Entry name inferred: _WinMainCRTStartup
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: []

View File

@ -3,7 +3,7 @@
# RUN: llvm-as -o %t.lto.obj %S/Inputs/entry-mangled.ll
# RUN: lld-link /out:%t.exe /entry:main %t.lto.obj
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -74,7 +74,7 @@
# CHECK6: duplicate /export option: _exportfn2
# CHECK6-NOT: duplicate /export option: _exportfn1
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: []

View File

@ -6,7 +6,7 @@
# CHECK: .obj: undefined symbol: foo
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -6,7 +6,7 @@
# CHECK: Selected foo
# CHECK: Removed bar
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -6,7 +6,7 @@
# CHECK: Selected foo
# CHECK: Removed bar
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -6,7 +6,7 @@
# CHECK-NOT: Selected foo
# CHECK-NOT: Removed bar
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -8,7 +8,7 @@
# CHECK-NOT: Removed bar
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -16,7 +16,7 @@
# NOICF-NOT: Removed foo
# NOICF-NOT: Removed bar
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -10,7 +10,7 @@
# CHECK: Symbol: (2)
# CHECK: }
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -14,7 +14,7 @@
# CHECK2-NOT: Discarded unused
# CHECK2-NOT: Discarded used
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -5,7 +5,7 @@
# RUN: yaml2obj < %p/Inputs/ret42.yaml > %t3.obj
# RUN: lld-link /out:%t.exe /entry:main %t1.obj %t2.obj %t3.obj
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -3,7 +3,7 @@
# CHECK: getSectionName failed: #1:
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -5,7 +5,7 @@
# CHECK: LoadConfigTableRVA: 0x1000
# CHECK: LoadConfigTableSize: 0x70
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -5,7 +5,7 @@
# CHECK: LoadConfigTableRVA: 0x1000
# CHECK: LoadConfigTableSize: 0x40
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: []

View File

@ -19,7 +19,7 @@
# BASEREL-NEXT: }
# BASEREL-NEXT: ]
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -8,7 +8,7 @@
# CHECK: Contents of section .rdata:
# CHECK-NEXT: 2000 04104000
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: []

View File

@ -5,7 +5,7 @@
# CHECK: Name: .data_long_section_name
# CHECK: Name: .text_long_section_name
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]

View File

@ -6,7 +6,7 @@
# CHECK: Name: .def
# CHECK: Name: .abc
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -14,7 +14,7 @@
# CHECK1: Discarded unused
# CHECK2-NOT: Discarded unused
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -11,7 +11,7 @@
# CHECK: 402050 fe07d62f 00000000 00000000 00000000
# CHECK: 402060 00000000 00000000 00000000 00000000
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_ARMNT
Characteristics: []

View File

@ -15,7 +15,7 @@
# CHECK: 1051: a1 02 00 00 00 00 00 00 00
# CHECK: 105a: a1 03 00 00 00 00 00 00 00
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -10,7 +10,7 @@
# CHECK: 1014: a1 00 00 02 00
# CHECK: 1019: a1 03 00 00 00
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: []

View File

@ -8,7 +8,7 @@
# CHECK: /safeseh: {{.*}} is not compatible with SEH
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: [ ]

View File

@ -31,7 +31,7 @@
# S-NEXT: IMAGE_SCN_MEM_SHARED
# S-NEXT: ]
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -5,7 +5,7 @@
# CHECK: Contents of section .rdata:
# CHECK: 1000 00200000 02200000
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: [ ]

View File

@ -11,7 +11,7 @@
# CHECK: Name: .reloc
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: [ ]

View File

@ -19,7 +19,7 @@
# WINMAIN: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
# WWINMAIN: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -111,7 +111,7 @@
# NO: Symbols [
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -5,7 +5,7 @@
# CHECK: TLSTableRVA: 0x1000
# CHECK: TLSTableSize: 0x28
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: []

View File

@ -5,7 +5,7 @@
# CHECK: TLSTableRVA: 0x1000
# CHECK: TLSTableSize: 0x18
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: []

View File

@ -55,7 +55,7 @@
# UNWIND: 0x07: UOP_AllocLarge 8190
# UNWIND: 0x00: UOP_PushMachFrame w/o error code
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]

View File

@ -8,7 +8,7 @@
# CHECK-NOT: :
# CHECK: {{ g$}}
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]

View File

@ -2,7 +2,7 @@
# RUN: llvm-as -o %t.lto.obj %S/Inputs/weak-external2.ll
# RUN: lld-link /out:%t.exe /entry:g /subsystem:console %t.obj %t.lto.obj
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]

View File

@ -13,7 +13,7 @@
# CHECK2-NOT: :
# CHECK2: {{ f$}}
---
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]

View File

@ -1,10 +1,11 @@
# RUN: yaml2obj -format elf %s -o %t.o
# RUN: yaml2obj %s -o %t.o
# RUN: ld.lld %t.o -o %t -shared
# RUN: llvm-readobj -s %t | FileCheck %s
# CHECK: Name: .eh_frame
# CHECK-NEXT: Type: SHT_PROGBITS
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB

View File

@ -1,6 +1,7 @@
# RUN: yaml2obj -format elf %s -o %t
# RUN: yaml2obj %s -o %t
# RUN: not ld.lld %t -o %tout 2>&1 | FileCheck %s
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB

View File

@ -1,8 +1,9 @@
# RUN: yaml2obj -format elf %s -o %t
# RUN: yaml2obj %s -o %t
# RUN: ld.lld %t -o %tout
# Verify that lld can handle sections with an alignment of zero.
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB