2014-03-08 07:05:10 +08:00
|
|
|
# RUN: yaml2obj %p/Inputs/merge-same-size1.obj.yaml > %t1.obj
|
|
|
|
# RUN: yaml2obj %p/Inputs/merge-same-size2.obj.yaml > %t2.obj
|
2014-03-08 09:27:22 +08:00
|
|
|
# RUN: yaml2obj %p/Inputs/merge-same-size3.obj.yaml > %t3.obj
|
2014-03-08 07:05:10 +08:00
|
|
|
#
|
|
|
|
# RUN: lld -flavor link /out:%t.exe /subsystem:console /opt:noref /force \
|
2014-03-08 09:27:22 +08:00
|
|
|
# RUN: -- %t1.obj %t2.obj > %t1.log 2>&1
|
2014-03-08 07:05:10 +08:00
|
|
|
#
|
|
|
|
# FileCheck complains if the input files is empty, so add a dummy line.
|
2014-03-08 09:27:22 +08:00
|
|
|
# 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
|
2014-03-08 07:05:10 +08:00
|
|
|
#
|
|
|
|
# RUN: llvm-readobj -sections %t.exe | FileCheck -check-prefix=READOBJ %s
|
|
|
|
|
2014-03-08 09:27:22 +08:00
|
|
|
SAMESIZE-NOT: duplicate symbol error
|
|
|
|
|
|
|
|
DIFFERENT: Size mismatch
|
|
|
|
DIFFERENT: duplicate symbol error
|
2014-03-08 07:05:10 +08:00
|
|
|
|
|
|
|
READOBJ: Format: COFF-i386
|
|
|
|
READOBJ-NEXT: Arch: i386
|
|
|
|
READOBJ-NEXT: AddressSize: 32bit
|
|
|
|
READOBJ-NEXT: Sections [
|
|
|
|
READOBJ-NEXT: Section {
|
|
|
|
READOBJ-NEXT: Number: 1
|
|
|
|
READOBJ-NEXT: Name: .text (2E 74 65 78 74 00 00 00)
|
|
|
|
READOBJ-NEXT: VirtualSize: 0x7
|
|
|
|
READOBJ-NEXT: VirtualAddress: 0x1000
|
2014-08-01 06:40:35 +08:00
|
|
|
READOBJ-NEXT: RawDataSize: 512
|