brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · b8d80d9 Raw
43 lines · plain
1RUN: yaml2obj %p/Inputs/x86_64-exe.yaml -o %t.in123.exe2 3# Using a debuglink filename with a length that is a multiple of 4, to4# showcase padding in CONTENTS below.5 6RUN: llvm-objcopy --add-gnu-debuglink=%t.in123.exe %t.in123.exe %t.out.exe7RUN: llvm-readobj --sections %t.out.exe | FileCheck %s --check-prefix=SECTIONS8RUN: llvm-objdump -s %t.out.exe | FileCheck %s --check-prefix=CONTENTS9 10# Show the last of the preexisting sections, which is used for choosing11# a virtual address for the generated one.12 13SECTIONS:        Section {14SECTIONS:          Number: 415SECTIONS-NEXT:     Name: .pdata16SECTIONS-NEXT:     VirtualSize: 0x1817SECTIONS-NEXT:     VirtualAddress: 0x400018SECTIONS-NEXT:     RawDataSize: 51219SECTIONS:        Section {20SECTIONS-NEXT:     Number: 521SECTIONS-NEXT:     Name: .gnu_debuglink22SECTIONS-NEXT:     VirtualSize: 0x2C23SECTIONS-NEXT:     VirtualAddress: 0x500024SECTIONS-NEXT:     RawDataSize: 51225SECTIONS-NEXT:     PointerToRawData:26SECTIONS-NEXT:     PointerToRelocations:27SECTIONS-NEXT:     PointerToLineNumbers:28SECTIONS-NEXT:     RelocationCount:29SECTIONS-NEXT:     LineNumberCount:30SECTIONS-NEXT:     Characteristics [ (0x42000040)31SECTIONS-NEXT:       IMAGE_SCN_CNT_INITIALIZED_DATA (0x40)32SECTIONS-NEXT:       IMAGE_SCN_MEM_DISCARDABLE (0x2000000)33SECTIONS-NEXT:       IMAGE_SCN_MEM_READ (0x40000000)34SECTIONS-NEXT:     ]35 36# Note: The last 4 bytes here are the crc of the referenced file - if the37# yaml2obj generated file changes, this crc changes.38 39CONTENTS: Contents of section .gnu_debuglink:40CONTENTS:  40005000 6164642d 676e752d 64656275 676c696e  add-gnu-debuglin41CONTENTS:  40005010 6b2e7465 73742e74 6d702e69 6e313233  k.test.tmp.in12342CONTENTS:  40005020 2e657865 00000000 7929adc3           .exe43