c1f693518556aa15b7617fc0fc66bb419524f5db
[oota-llvm.git] / test / Object / yaml2obj-elf-section-basic.yaml
1 # RUN: yaml2obj -format=elf %s | llvm-readobj -sections -section-data - | FileCheck %s
2 !ELF
3 FileHeader:
4   Class: ELFCLASS64
5   Data: ELFDATA2LSB
6   Type: ET_REL
7   Machine: EM_X86_64
8 Sections:
9   - Name: .text
10     Type: SHT_PROGBITS
11     Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
12     Address: 0xCAFEBABE
13     Link: .text # Doesn't make sense for SHT_PROGBITS, but good enough for test.
14     Content: EBFE
15     AddressAlign: 2
16
17 # CHECK:        Section {
18 # CHECK:          Index: 0
19 # CHECK:          Type: SHT_NULL (0x0)
20 #
21 # CHECK:        Section {
22 # CHECK:          Name: .text
23 # CHECK:          Type: SHT_PROGBITS (0x1)
24 # CHECK-NEXT:     Flags [ (0x6)
25 # CHECK-NEXT:       SHF_ALLOC (0x2)
26 # CHECK-NEXT:       SHF_EXECINSTR (0x4)
27 # CHECK-NEXT:     ]
28 # CHECK-NEXT:     Address: 0xCAFEBABE
29 # CHECK:          Size: 2
30 # Check that Link != 0.
31 # CHECK:          Link: {{[1-9][0-9]*}}
32 # CHECK:          AddressAlignment: 2
33 # CHECK:          SectionData (
34 # CHECK-NEXT:       0000: EBFE
35 # CHECK-NEXT:     )
36 #
37 # CHECK:        Section {
38 # CHECK:          Name: .symtab (7)
39 # CHECK:          Type: SHT_SYMTAB (0x2)
40 # CHECK:        }
41 # CHECK:        Section {
42 # CHECK:          Name: .strtab (15)
43 # CHECK:          Type: SHT_STRTAB (0x3)
44 # CHECK:        }
45 # CHECK:        Section {
46 # CHECK:          Name: .shstrtab (23)
47 # CHECK:          Type: SHT_STRTAB (0x3)
48 # CHECK:        }