1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2024-12-25 14:32:53 +00:00
llvm-6502/test/Object/yaml2obj-elf-section-basic.yaml
2014-03-14 06:53:16 +00:00

49 lines
1.3 KiB
YAML

# 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: )
#
# CHECK: Section {
# CHECK: Name: .symtab (7)
# CHECK: Type: SHT_SYMTAB (0x2)
# CHECK: }
# CHECK: Section {
# CHECK: Name: .strtab (15)
# CHECK: Type: SHT_STRTAB (0x3)
# CHECK: }
# CHECK: Section {
# CHECK: Name: .shstrtab (23)
# CHECK: Type: SHT_STRTAB (0x3)
# CHECK: }