1 ## This is a general test for the --section-headers option.
3 # RUN: yaml2obj %s -o %t1
4 # RUN: llvm-readobj --section-headers %t1 | \
5 # RUN: FileCheck --strict-whitespace --match-full-lines --check-prefix=SEC32 %s
7 # SEC32:Format: aixcoff-rs6000
8 # SEC32-NEXT:Arch: powerpc
9 # SEC32-NEXT:AddressSize: 32bit
10 # SEC32-NEXT:Sections [
11 # SEC32-NEXT: Section {
12 # SEC32-NEXT: Index: 1
13 # SEC32-NEXT: Name: .text
14 # SEC32-NEXT: PhysicalAddress: 0x0
15 # SEC32-NEXT: VirtualAddress: 0x0
16 # SEC32-NEXT: Size: 0x4
17 # SEC32-NEXT: RawDataOffset: 0x64
18 # SEC32-NEXT: RelocationPointer: 0x0
19 # SEC32-NEXT: LineNumberPointer: 0x0
20 # SEC32-NEXT: NumberOfRelocations: 0
21 # SEC32-NEXT: NumberOfLineNumbers: 0
22 # SEC32-NEXT: Type: STYP_TEXT (0x20)
24 # SEC32-NEXT: Section {
25 # SEC32-NEXT: Index: 2
26 # SEC32-NEXT: Name: .data
27 # SEC32-NEXT: PhysicalAddress: 0x4
28 # SEC32-NEXT: VirtualAddress: 0x4
29 # SEC32-NEXT: Size: 0x4
30 # SEC32-NEXT: RawDataOffset: 0x68
31 # SEC32-NEXT: RelocationPointer: 0x6C
32 # SEC32-NEXT: LineNumberPointer: 0x0
33 # SEC32-NEXT: NumberOfRelocations: 1
34 # SEC32-NEXT: NumberOfLineNumbers: 0
35 # SEC32-NEXT: Type: STYP_DATA (0x40)
41 MagicNumber: [[MAGIC=0x1DF]]
55 # RUN: yaml2obj -DMAGIC=0x01F7 %s -o %t2
56 # RUN: llvm-readobj --section-headers %t2 | \
57 # RUN: FileCheck --strict-whitespace --match-full-lines --check-prefix=SEC64 %s
59 # SEC64:Format: aix5coff64-rs6000
60 # SEC64-NEXT:Arch: powerpc64
61 # SEC64-NEXT:AddressSize: 64bit
62 # SEC64-NEXT:Sections [
63 # SEC64-NEXT: Section {
64 # SEC64-NEXT: Index: 1
65 # SEC64-NEXT: Name: .text
66 # SEC64-NEXT: PhysicalAddress: 0x0
67 # SEC64-NEXT: VirtualAddress: 0x0
68 # SEC64-NEXT: Size: 0x4
69 # SEC64-NEXT: RawDataOffset: 0xA8
70 # SEC64-NEXT: RelocationPointer: 0x0
71 # SEC64-NEXT: LineNumberPointer: 0x0
72 # SEC64-NEXT: NumberOfRelocations: 0
73 # SEC64-NEXT: NumberOfLineNumbers: 0
74 # SEC64-NEXT: Type: STYP_TEXT (0x20)
76 # SEC64-NEXT: Section {
77 # SEC64-NEXT: Index: 2
78 # SEC64-NEXT: Name: .data
79 # SEC64-NEXT: PhysicalAddress: 0x4
80 # SEC64-NEXT: VirtualAddress: 0x4
81 # SEC64-NEXT: Size: 0x4
82 # SEC64-NEXT: RawDataOffset: 0xAC
83 # SEC64-NEXT: RelocationPointer: 0xB0
84 # SEC64-NEXT: LineNumberPointer: 0x0
85 # SEC64-NEXT: NumberOfRelocations: 1
86 # SEC64-NEXT: NumberOfLineNumbers: 0
87 # SEC64-NEXT: Type: STYP_DATA (0x40)