aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-objcopy/COFF/check-debug-dir-present.test
blob: 7fd10486b5852f233f8297f077750975175e9e3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
## We check that we copy sections to an image in the case when there are
## exactly 6 directory entries.
# RUN: yaml2obj --docnum=1 %s -o %t
# RUN: llvm-objcopy --add-section new_sect=%t %t %t1
# RUN: obj2yaml %t1 | FileCheck %s

# CHECK:         NumberOfRvaAndSize: 6
# CHECK-NEXT:    ExportTable:
# CHECK-NEXT:      RelativeVirtualAddress: 0
# CHECK-NEXT:      Size:            0
# CHECK-NEXT:    ImportTable:
# CHECK-NEXT:      RelativeVirtualAddress: 0
# CHECK-NEXT:      Size:            0
# CHECK-NEXT:    ResourceTable:
# CHECK-NEXT:      RelativeVirtualAddress: 0
# CHECK-NEXT:      Size:            0
# CHECK-NEXT:    ExceptionTable:
# CHECK-NEXT:      RelativeVirtualAddress: 0
# CHECK-NEXT:      Size:            0
# CHECK-NEXT:    CertificateTable:
# CHECK-NEXT:      RelativeVirtualAddress: 0
# CHECK-NEXT:      Size:            0
# CHECK-NEXT:    BaseRelocationTable:
# CHECK-NEXT:      RelativeVirtualAddress: 0
# CHECK-NEXT:      Size:            0
# CHECK:       sections:
# CHECK-NEXT:    - Name:            foo
# CHECK-NEXT:      Characteristics: [  ]
# CHECK-NEXT:      Alignment:       4
# CHECK-NEXT:      SectionData:     ''
# CHECK-NEXT:    - Name:            new_sect
# CHECK-NEXT:      Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA ]
# CHECK-NEXT:      Alignment:       1
# CHECK-NEXT:      SectionData:     ''

--- !COFF
OptionalHeader:
  AddressOfEntryPoint: 4096
  ImageBase:       0
  SectionAlignment: 4096
  FileAlignment:   512
  MajorOperatingSystemVersion: 0
  MinorOperatingSystemVersion: 0
  MajorImageVersion: 0
  MinorImageVersion: 0
  MajorSubsystemVersion: 0
  MinorSubsystemVersion: 0
  Subsystem:       IMAGE_SUBSYSTEM_EFI_APPLICATION
  DLLCharacteristics: [  ]
  SizeOfStackReserve: 0
  SizeOfStackCommit: 0
  SizeOfHeapReserve: 0
  SizeOfHeapCommit: 0
  NumberOfRvaAndSize: 6
  ExportTable:
    RelativeVirtualAddress: 0
    Size:            0
  ImportTable:
    RelativeVirtualAddress: 0
    Size:            0
  ResourceTable:
    RelativeVirtualAddress: 0
    Size:            0
  ExceptionTable:
    RelativeVirtualAddress: 0
    Size:            0
  CertificateTable:
    RelativeVirtualAddress: 0
    Size:            0
  BaseRelocationTable:
    RelativeVirtualAddress: 0
    Size:            0
header:
  Machine:         IMAGE_FILE_MACHINE_AMD64
  Characteristics: [ ]
sections:
  - Name:            foo
    Characteristics: [ ]
    Alignment:       4
symbols:
...