90 lines
2.7 KiB
Plaintext
90 lines
2.7 KiB
Plaintext
## This is a general test for the --section-headers option.
|
|
|
|
# RUN: yaml2obj %s -o %t1
|
|
# RUN: llvm-readobj --section-headers %t1 | \
|
|
# RUN: FileCheck --strict-whitespace --match-full-lines --check-prefix=SEC32 %s
|
|
|
|
# SEC32:Format: aixcoff-rs6000
|
|
# SEC32-NEXT:Arch: powerpc
|
|
# SEC32-NEXT:AddressSize: 32bit
|
|
# SEC32-NEXT:Sections [
|
|
# SEC32-NEXT: Section {
|
|
# SEC32-NEXT: Index: 1
|
|
# SEC32-NEXT: Name: .text
|
|
# SEC32-NEXT: PhysicalAddress: 0x0
|
|
# SEC32-NEXT: VirtualAddress: 0x0
|
|
# SEC32-NEXT: Size: 0x4
|
|
# SEC32-NEXT: RawDataOffset: 0x64
|
|
# SEC32-NEXT: RelocationPointer: 0x0
|
|
# SEC32-NEXT: LineNumberPointer: 0x0
|
|
# SEC32-NEXT: NumberOfRelocations: 0
|
|
# SEC32-NEXT: NumberOfLineNumbers: 0
|
|
# SEC32-NEXT: Type: STYP_TEXT (0x20)
|
|
# SEC32-NEXT: }
|
|
# SEC32-NEXT: Section {
|
|
# SEC32-NEXT: Index: 2
|
|
# SEC32-NEXT: Name: .data
|
|
# SEC32-NEXT: PhysicalAddress: 0x4
|
|
# SEC32-NEXT: VirtualAddress: 0x4
|
|
# SEC32-NEXT: Size: 0x4
|
|
# SEC32-NEXT: RawDataOffset: 0x68
|
|
# SEC32-NEXT: RelocationPointer: 0x6C
|
|
# SEC32-NEXT: LineNumberPointer: 0x0
|
|
# SEC32-NEXT: NumberOfRelocations: 1
|
|
# SEC32-NEXT: NumberOfLineNumbers: 0
|
|
# SEC32-NEXT: Type: STYP_DATA (0x40)
|
|
# SEC32-NEXT: }
|
|
# SEC32-NEXT:]
|
|
|
|
--- !XCOFF
|
|
FileHeader:
|
|
MagicNumber: [[MAGIC=0x1DF]]
|
|
Sections:
|
|
- Name: .text
|
|
Flags: [ STYP_TEXT ]
|
|
SectionData: "1234"
|
|
- Name: .data
|
|
Flags: [ STYP_DATA ]
|
|
SectionData: "5678"
|
|
Relocations:
|
|
- Address: 0x80
|
|
Symbol: 0x21
|
|
Info: 0x1F
|
|
Type: 0x0
|
|
|
|
# RUN: yaml2obj -DMAGIC=0x01F7 %s -o %t2
|
|
# RUN: llvm-readobj --section-headers %t2 | \
|
|
# RUN: FileCheck --strict-whitespace --match-full-lines --check-prefix=SEC64 %s
|
|
|
|
# SEC64:Format: aix5coff64-rs6000
|
|
# SEC64-NEXT:Arch: powerpc64
|
|
# SEC64-NEXT:AddressSize: 64bit
|
|
# SEC64-NEXT:Sections [
|
|
# SEC64-NEXT: Section {
|
|
# SEC64-NEXT: Index: 1
|
|
# SEC64-NEXT: Name: .text
|
|
# SEC64-NEXT: PhysicalAddress: 0x0
|
|
# SEC64-NEXT: VirtualAddress: 0x0
|
|
# SEC64-NEXT: Size: 0x4
|
|
# SEC64-NEXT: RawDataOffset: 0xA8
|
|
# SEC64-NEXT: RelocationPointer: 0x0
|
|
# SEC64-NEXT: LineNumberPointer: 0x0
|
|
# SEC64-NEXT: NumberOfRelocations: 0
|
|
# SEC64-NEXT: NumberOfLineNumbers: 0
|
|
# SEC64-NEXT: Type: STYP_TEXT (0x20)
|
|
# SEC64-NEXT: }
|
|
# SEC64-NEXT: Section {
|
|
# SEC64-NEXT: Index: 2
|
|
# SEC64-NEXT: Name: .data
|
|
# SEC64-NEXT: PhysicalAddress: 0x4
|
|
# SEC64-NEXT: VirtualAddress: 0x4
|
|
# SEC64-NEXT: Size: 0x4
|
|
# SEC64-NEXT: RawDataOffset: 0xAC
|
|
# SEC64-NEXT: RelocationPointer: 0xB0
|
|
# SEC64-NEXT: LineNumberPointer: 0x0
|
|
# SEC64-NEXT: NumberOfRelocations: 1
|
|
# SEC64-NEXT: NumberOfLineNumbers: 0
|
|
# SEC64-NEXT: Type: STYP_DATA (0x40)
|
|
# SEC64-NEXT: }
|
|
# SEC64-NEXT:]
|