57 lines · plain
1## Check that llvm-objcopy does not produce an error for debug directory2## entries without a payload (e.g. IMAGE_DEBUG_TYPE_REPRO,3## IMAGE_DEBUG_TYPE_UNKNOWN) when patching entries that may have moved during4## a requested operation. Also check that the such debug entries are present5## in the output.6 7## The code to patch debug entries is executed even when no operation is8## requested. Hence the RUN line below invokes llvm-objcopy without any9## arguments.10 11# RUN: yaml2obj %s -o %t.in.exe12# RUN: llvm-objcopy %t.in.exe %t.out.exe13# RUN: llvm-readobj --coff-debug-directory %t.out.exe | FileCheck %s14 15# CHECK: Type: Repro (0x10)16# CHECK: Type: Unknown (0x0)17 18--- !COFF19OptionalHeader:20 AddressOfEntryPoint: 409621 ImageBase: 107374182422 SectionAlignment: 409623 FileAlignment: 51224 MajorOperatingSystemVersion: 625 MinorOperatingSystemVersion: 026 MajorImageVersion: 027 MinorImageVersion: 028 MajorSubsystemVersion: 629 MinorSubsystemVersion: 030 Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI31 DLLCharacteristics: [ ]32 SizeOfStackReserve: 104857633 SizeOfStackCommit: 409634 SizeOfHeapReserve: 104857635 SizeOfHeapCommit: 409636 Debug:37 RelativeVirtualAddress: 819238 Size: 5639header:40 Machine: IMAGE_FILE_MACHINE_AMD6441 Characteristics: [ ]42sections:43 - Name: .text44 Characteristics: [ ]45 VirtualAddress: 409646 VirtualSize: 347 SectionData: 31C0C348 - Name: .rdata49 Characteristics: [ ]50 VirtualAddress: 819251 VirtualSize: 5652 ## '10' in SectionData below indicates the Repro type for the first debug53 ## entry. The second entry has a type of Unknown ('00').54 SectionData: 0000000047F96B2000000000100000000000000000000000000000000000000047F96B20000000000000000000000000000000000000000055symbols: []56...57