[Instrumentation] Fix a warning
[llvm-project.git] / llvm / test / tools / llvm-readobj / XCOFF / loader-section-header.test
blob5aa456537a11d00c29589e4686a34d42fedcc716
1 ## Test the --loader-section-header option.
3 # RUN: yaml2obj --docnum=1 %s -o %t_xcoff32.o
4 # RUN: yaml2obj --docnum=2  %s -o %t_xcoff64.o
5 # RUN: llvm-readobj --loader-section-header %t_xcoff32.o |\
6 # RUN:   FileCheck %s --check-prefixes=CHECK32
7 # RUN: llvm-readobj --loader-section-header %t_xcoff64.o |\
8 # RUN:   FileCheck %s --check-prefixes=CHECK64
10 --- !XCOFF
11 FileHeader:
12   MagicNumber:       0x1DF
13 Sections:
14   - Name:            .loader
15     Flags:           [ STYP_LOADER ]
16     SectionData:     "0000000100000003000000050000016D00000001000000A40000001800000211"
17 ##                    ^-------                                                           -Version=1
18 ##                            ^-------                                                   -NumberOfSymbolEntries=3
19 ##                                    ^-------                                           -NumberOfRelocationEntries=5
20 ##                                            ^-------                                   -LengthOfImportFileIDStringTable=365
21 ##                                                    ^-------                           -NumberOfImportFileIDs=1
22 ##                                                            ^-------                   -OffsetToImportFileIDs=0xA4
23 ##                                                                    ^-------           -LengthOfStringTable=24
24 ##                                                                            ^-------   -OffsetToStringTable=0x211
27 --- !XCOFF
28 FileHeader:
29   MagicNumber:       0x1F7
30 Sections:
31   - Name:            .loader
32     Flags:           [ STYP_LOADER ]
33     SectionData:     "0000000200000003000000050000016D000000010000002300000000000000D0000000000000023D00000000000000380000000000000080"
34 ##                    ^-------                                                           -Version=2
35 ##                            ^-------                                                   -NumberOfSymbolEntries=3
36 ##                                    ^-------                                           -NumberOfRelocationEntries=5
37 ##                                            ^-------                                   -LengthOfImportFileIDStringTable=365
38 ##                                                    ^-------                           -NumberOfImportFileIDs=1
39 ##                                                            ^-------                   --LengthOfStringTable=0x23
40 ##                                                                    ^---------------   -OffsetToImportFileIDs=0xD0
41 ##                                                                                    ^---------------                                        -OffsetToStringTable=0x23D
42 ##                                                                                                    ^--------------                         -OffsetToSymbolTable=0x38
43 ##                                                                                                                    ^---------------        -OffsetToRelocationEntries=0x80
45 # CHECK32:      Loader Section {
46 # CHECK32-NEXT:     Loader Section Header {
47 # CHECK32-NEXT:       Version: 1
48 # CHECK32-NEXT:       NumberOfSymbolEntries: 3
49 # CHECK32-NEXT:       NumberOfRelocationEntries: 5
50 # CHECK32-NEXT:       LengthOfImportFileIDStringTable: 365
51 # CHECK32-NEXT:       NumberOfImportFileIDs: 1
52 # CHECK32-NEXT:       OffsetToImportFileIDs: 0xA4
53 # CHECK32-NEXT:       LengthOfStringTable: 24
54 # CHECK32-NEXT:       OffsetToStringTable: 0x211
55 # CHECK32-NEXT:   }
56 # CHECK32-NEXT: }
58 # CHECK64:      Loader Section {
59 # CHECK64-NEXT:     Loader Section Header {
60 # CHECK64-NEXT:       Version: 2
61 # CHECK64-NEXT:       NumberOfSymbolEntries: 3
62 # CHECK64-NEXT:       NumberOfRelocationEntries: 5
63 # CHECK64-NEXT:       LengthOfImportFileIDStringTable: 365
64 # CHECK64-NEXT:       NumberOfImportFileIDs: 1
65 # CHECK64-NEXT:       OffsetToImportFileIDs: 0xD0
66 # CHECK64-NEXT:       LengthOfStringTable: 35
67 # CHECK64-NEXT:       OffsetToStringTable: 0x23D
68 # CHECK64-NEXT:       OffsetToSymbolTable: 0x38
69 # CHECK64-NEXT:       OffsetToRelocationEntries: 0x80
70 # CHECK64-NEXT:   }
71 # CHECK64-NEXT: }