53 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 debug info shall not be loaded.5 6# RUN: yaml2obj %s -o %t7# RUN: llvm-objcopy --strip-all --add-gnu-debuglink=%t %t %t.stripped8# RUN: llvm-strip --only-keep-debug %t9# RUN: lldb-test object-file %t.stripped | FileCheck %s10 11# CHECK-NOT: Name: .debug_info12# CHECK-NOT: Type: dwarf-info13 14--- !COFF15OptionalHeader:16 AddressOfEntryPoint: 515217 ImageBase: 536870912018 SectionAlignment: 409619 FileAlignment: 51220 MajorOperatingSystemVersion: 621 MinorOperatingSystemVersion: 022 MajorImageVersion: 023 MinorImageVersion: 024 MajorSubsystemVersion: 625 MinorSubsystemVersion: 026 Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI27 DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]28 SizeOfStackReserve: 104857629 SizeOfStackCommit: 409630 SizeOfHeapReserve: 104857631 SizeOfHeapCommit: 409632header:33 Machine: IMAGE_FILE_MACHINE_AMD6434 Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]35sections:36 - Name: .text37 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]38 VirtualAddress: 409639 VirtualSize: 6440 SectionData: DEADBEEFBAADF00D41 - Name: .data42 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]43 VirtualAddress: 819244 VirtualSize: 6445 SectionData: DEADBEEFBAADF00D46 - Name: .debug_info47 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]48 VirtualAddress: 1638449 VirtualSize: 6450 SectionData: DEADBEEFBAADF00D51symbols: []52...53