64 lines · yaml
1# This test produces a stripped version of the object file and adds a2# gnu-debuglink section to it linking to the unstripped version of the object3# file. Then the unstripped version is stripped to keep only debug info to4# cause its crc to change. In this case the object files still have the5# synthetic PDB build id that LLD adds even for the mingw target. Because this6# build id still matches, the debug info shall still be loaded from the7# gnu-debuglink reference.8 9# RUN: yaml2obj %s -o %t10# RUN: llvm-objcopy --strip-all --add-gnu-debuglink=%t %t %t.stripped11# RUN: llvm-strip --only-keep-debug %t12# RUN: lldb-test object-file %t.stripped | FileCheck %s13 14# CHECK: Name: .debug_info15# CHECK-NEXT: Type: dwarf-info16 17--- !COFF18OptionalHeader:19 AddressOfEntryPoint: 515220 ImageBase: 536870912021 SectionAlignment: 409622 FileAlignment: 51223 MajorOperatingSystemVersion: 624 MinorOperatingSystemVersion: 025 MajorImageVersion: 026 MinorImageVersion: 027 MajorSubsystemVersion: 628 MinorSubsystemVersion: 029 Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI30 DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]31 SizeOfStackReserve: 104857632 SizeOfStackCommit: 409633 SizeOfHeapReserve: 104857634 SizeOfHeapCommit: 409635 Debug:36 RelativeVirtualAddress: 1638437 Size: 2838header:39 Machine: IMAGE_FILE_MACHINE_AMD6440 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]41sections:42 - Name: .text43 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]44 VirtualAddress: 409645 VirtualSize: 6446 SectionData: DEADBEEFBAADF00D47 - Name: .data48 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]49 VirtualAddress: 819250 VirtualSize: 6451 SectionData: DEADBEEFBAADF00D52 - Name: .buildid53 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]54 VirtualAddress: 1638455 VirtualSize: 5356 SectionData: 00000000E5038E620000000002000000190000001C4000001C300000525344534674A52A37FB4C784C4C44205044422E010000000057 - Name: .debug_info58 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]59 VirtualAddress: 2048060 VirtualSize: 6461 SectionData: DEADBEEFBAADF00D62symbols: []63...64