1 # RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic.o | \
2 # RUN: FileCheck --check-prefix=FILEHEADER %s
4 # RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic-64.o | \
5 # RUN: FileCheck --check-prefix=FILEHEADER64 %s
7 # RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic-neg-time.o | \
8 # RUN: FileCheck --check-prefix=NEGTIME %s
10 # RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic-neg-sym-count.o | \
11 # RUN: FileCheck --check-prefix=NEGSYMCOUNT %s
13 # FILEHEADER: File: {{.*}}xcoff-basic.o
14 # FILEHEADER-NEXT: Format: aixcoff-rs6000
15 # FILEHEADER-NEXT: Arch: powerpc
16 # FILEHEADER-NEXT: AddressSize: 32bit
17 # FILEHEADER-NEXT: FileHeader {
18 # FILEHEADER-NEXT: Magic: 0x1DF
19 # FILEHEADER-NEXT: NumberOfSections: 6
20 # FILEHEADER-NEXT: TimeStamp: 2019-03-12T14:04:43Z (0x5C87BC7B)
21 # FILEHEADER-NEXT: SymbolTableOffset: 0x52E
22 # FILEHEADER-NEXT: SymbolTableEntries: 120
23 # FILEHEADER-NEXT: OptionalHeaderSize: 0x1C
24 # FILEHEADER-NEXT: Flags: 0x0
27 # FILEHEADER64: File: {{.*}}xcoff-basic-64.o
28 # FILEHEADER64-NEXT: Format: aix5coff64-rs6000
29 # FILEHEADER64-NEXT: Arch: powerpc64
30 # FILEHEADER64-NEXT: AddressSize: 64bit
31 # FILEHEADER64-NEXT: FileHeader {
32 # FILEHEADER64-NEXT: Magic: 0x1F7
33 # FILEHEADER64-NEXT: NumberOfSections: 5
34 # FILEHEADER64-NEXT: TimeStamp: 2019-03-18T20:03:47Z (0x5C8FF9A3)
35 # FILEHEADER64-NEXT: SymbolTableOffset: 0x54C
36 # FILEHEADER64-NEXT: SymbolTableEntries: 58
37 # FILEHEADER64-NEXT: OptionalHeaderSize: 0x0
38 # FILEHEADER64-NEXT: Flags: 0x0
39 # FILEHEADER64-NEXT: }
41 # NEGTIME: File: {{.*}}xcoff-basic-neg-time.o
42 # NEGTIME-NEXT: Format: aixcoff-rs6000
43 # NEGTIME-NEXT: Arch: powerpc
44 # NEGTIME-NEXT: AddressSize: 32bit
45 # NEGTIME-NEXT: FileHeader {
46 # NEGTIME-NEXT: Magic: 0x1DF
47 # NEGTIME-NEXT: NumberOfSections: 6
48 # NEGTIME-NEXT: TimeStamp: Reserved Value (0xDC87BC7B)
49 # NEGTIME-NEXT: SymbolTableOffset: 0x52E
50 # NEGTIME-NEXT: SymbolTableEntries: 120
51 # NEGTIME-NEXT: OptionalHeaderSize: 0x1C
52 # NEGTIME-NEXT: Flags: 0x0
55 # NEGSYMCOUNT: File: {{.*}}xcoff-basic-neg-sym-count.o
56 # NEGSYMCOUNT-NEXT: Format: aixcoff-rs6000
57 # NEGSYMCOUNT-NEXT: Arch: powerpc
58 # NEGSYMCOUNT-NEXT: AddressSize: 32bit
59 # NEGSYMCOUNT-NEXT: FileHeader {
60 # NEGSYMCOUNT-NEXT: Magic: 0x1DF
61 # NEGSYMCOUNT-NEXT: NumberOfSections: 5
62 # NEGSYMCOUNT-NEXT: TimeStamp: 2019-03-12T14:04:43Z (0x5C87BC7B)
63 # NEGSYMCOUNT-NEXT: SymbolTableOffset: 0x0
64 # NEGSYMCOUNT-NEXT: SymbolTableEntries: Reserved Value (0x80000000)
65 # NEGSYMCOUNT-NEXT: OptionalHeaderSize: 0x1C
66 # NEGSYMCOUNT-NEXT: Flags: 0xD
69 # xcoff-basic.o was compiled with `xlc -qtls -O3 -g -c xcoff-basic.c`
70 # from the following source:
73 # __thread int j = 55;
75 # int A() { return a; }
76 # int B() { return b; }
77 # int J() { return j; }
78 # double D() { return d; }
80 # xcoff-basic-neg-time.o was manually edited to include a negative time stamp.
81 # xcoff-basic-neg-sym-count.o was stripped using the 'strip' utility, and
82 # manually edited to have a negative symbol table entry count.