llvm-project/lld/test/pecoff/merge-same-size.test

33 lines
1.1 KiB
Plaintext
Raw Normal View History

# 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 > %t1.log 2>&1
#
# FileCheck complains if the input files is empty, so add a dummy line.
# 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
SAMESIZE-NOT: duplicate symbol error
DIFFERENT: Size mismatch
DIFFERENT: duplicate symbol error
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
READOBJ-NEXT: RawDataSize: 512