File: yaml2obj-elf-section-basic.yaml

package info (click to toggle)
llvm-toolchain-3.4 1%3A3.4.2-13
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 253,236 kB
  • ctags: 276,203
  • sloc: cpp: 1,665,580; ansic: 298,647; asm: 206,157; objc: 84,350; python: 73,119; sh: 23,466; perl: 5,679; makefile: 5,542; ml: 5,250; pascal: 2,467; lisp: 1,420; xml: 679; cs: 236; csh: 117
file content (35 lines) | stat: -rw-r--r-- 983 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# RUN: yaml2obj -format=elf %s | llvm-readobj -sections -section-data - | FileCheck %s
!ELF
FileHeader:
  Class: ELFCLASS64
  Data: ELFDATA2LSB
  Type: ET_REL
  Machine: EM_X86_64
Sections:
  - Name: .text
    Type: SHT_PROGBITS
    Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
    Address: 0xCAFEBABE
    Link: .text # Doesn't make sense for SHT_PROGBITS, but good enough for test.
    Content: EBFE
    AddressAlign: 2

# CHECK:        Section {
# CHECK:          Index: 0
# CHECK:          Type: SHT_NULL (0x0)
#
# CHECK:        Section {
# CHECK:          Name: .text
# CHECK:          Type: SHT_PROGBITS (0x1)
# CHECK-NEXT:     Flags [ (0x6)
# CHECK-NEXT:       SHF_ALLOC (0x2)
# CHECK-NEXT:       SHF_EXECINSTR (0x4)
# CHECK-NEXT:     ]
# CHECK-NEXT:     Address: 0xCAFEBABE
# CHECK:          Size: 2
# Check that Link != 0.
# CHECK:          Link: {{[1-9][0-9]*}}
# CHECK:          AddressAlignment: 2
# CHECK:          SectionData (
# CHECK-NEXT:       0000: EBFE
# CHECK-NEXT:     )