1 # RUN: yaml2obj --docnum=1 %s -o %t-i386.o
2 # RUN: llvm-readelf -S %t-i386.o | FileCheck %s -check-prefix ELF32
4 # ELF32: There are 8 section headers, starting at offset 0x34:
6 # ELF32-NEXT: Section Headers:
7 # ELF32-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
8 # ELF32-NEXT: [ 0] NULL 00000000 000000 000000 00 0 0 0
9 # ELF32-NEXT: [ 1] .text PROGBITS 00000000 000174 000001 00 AX 0 0 4
10 # ELF32-NEXT: [ 2] .rel.text REL 00000000 000178 000000 08 5 1 4
11 # ELF32-NEXT: [ 3] .data PROGBITS 00000000 000178 000000 00 WA 0 0 4
12 # ELF32-NEXT: [ 4] .bss NOBITS 00000000 000178 000000 00 WA 0 0 4
13 # ELF32-NEXT: [ 5] .symtab SYMTAB 00000000 000178 000020 10 6 2 8
14 # ELF32-NEXT: [ 6] .strtab STRTAB 00000000 000198 000007 00 0 0 1
15 # ELF32-NEXT: [ 7] .shstrtab STRTAB 00000000 00019f 000030 00 0 0 1
16 # ELF32-NEXT: Key to Flags:
17 # ELF32-NEXT: W (write), A (alloc), X (execute), M (merge), S (strings), l (large)
18 # ELF32-NEXT: I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
19 # ELF32-NEXT: O (extra OS processing required) o (OS specific), p (processor specific)
31 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
32 AddressAlign: 0x0000000000000004
37 AddressAlign: 0x0000000000000004
38 EntSize: 0x0000000000000008
43 Flags: [ SHF_WRITE, SHF_ALLOC ]
44 AddressAlign: 0x0000000000000004
48 Flags: [ SHF_WRITE, SHF_ALLOC ]
49 AddressAlign: 0x0000000000000004
55 # RUN: yaml2obj --docnum=2 %s -o %t-x64.o
56 # RUN: llvm-readelf -S %t-x64.o | FileCheck %s -check-prefix ELF64
58 ## Check that --wide is the same as -W and ignored and also
59 ## that --section is the same as -S.
60 # RUN: llvm-readobj --wide --sections %t-x64.o --elf-output-style=GNU \
61 # RUN: | FileCheck %s -check-prefix ELF64
62 # RUN: llvm-readobj -W --sections %t-x64.o --elf-output-style=GNU \
63 # RUN: | FileCheck %s -check-prefix ELF64
64 # RUN: llvm-readelf -W -S %t-x64.o | FileCheck %s -check-prefix ELF64
66 # ELF64: There are 8 section headers, starting at offset 0x40:
68 # ELF64-NEXT: Section Headers:
69 # ELF64-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
70 # ELF64-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0 0 0
71 # ELF64-NEXT: [ 1] .text PROGBITS 0000000000000000 000240 000001 00 AX 0 0 4
72 # ELF64-NEXT: [ 2] .rela.text RELA 0000000000000000 000248 000000 18 5 1 8
73 # ELF64-NEXT: [ 3] .data PROGBITS 0000000000000000 000248 000000 00 WA 0 0 4
74 # ELF64-NEXT: [ 4] .bss NOBITS 0000000000000000 000248 000000 00 WA 0 0 4
75 # ELF64-NEXT: [ 5] .symtab SYMTAB 0000000000000000 000248 000030 18 6 2 8
76 # ELF64-NEXT: [ 6] .strtab STRTAB 0000000000000000 000278 000007 00 0 0 1
77 # ELF64-NEXT: [ 7] .shstrtab STRTAB 0000000000000000 00027f 000031 00 0 0 1
78 # ELF64-NEXT: Key to Flags:
79 # ELF64-NEXT: W (write), A (alloc), X (execute), M (merge), S (strings), l (large)
80 # ELF64-NEXT: I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
81 # ELF64-NEXT: O (extra OS processing required) o (OS specific), p (processor specific)
93 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
94 AddressAlign: 0x0000000000000004
99 AddressAlign: 0x0000000000000008
100 EntSize: 0x0000000000000018
105 Flags: [ SHF_WRITE, SHF_ALLOC ]
106 AddressAlign: 0x0000000000000004
110 Flags: [ SHF_WRITE, SHF_ALLOC ]
111 AddressAlign: 0x0000000000000004