2013-06-13 22:20:01 +00:00
|
|
|
# RUN: yaml2obj -format=elf %s | llvm-readobj -sections -section-data - | FileCheck %s
|
2013-06-13 22:19:48 +00:00
|
|
|
!ELF
|
|
|
|
FileHeader:
|
|
|
|
Class: ELFCLASS64
|
|
|
|
Data: ELFDATA2LSB
|
|
|
|
Type: ET_REL
|
|
|
|
Machine: EM_X86_64
|
|
|
|
Sections:
|
|
|
|
- Name: .text
|
|
|
|
Type: SHT_PROGBITS
|
|
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
2013-06-14 00:38:02 +00:00
|
|
|
Address: 0xCAFEBABE
|
2013-06-15 00:25:26 +00:00
|
|
|
Link: .text # Doesn't make sense for SHT_PROGBITS, but good enough for test.
|
2013-06-13 22:20:01 +00:00
|
|
|
Content: EBFE
|
2013-06-14 00:38:02 +00:00
|
|
|
AddressAlign: 2
|
2013-06-13 22:19:48 +00:00
|
|
|
|
|
|
|
# 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: ]
|
2013-06-14 00:38:02 +00:00
|
|
|
# CHECK-NEXT: Address: 0xCAFEBABE
|
2013-06-13 22:20:01 +00:00
|
|
|
# CHECK: Size: 2
|
2013-06-15 00:25:26 +00:00
|
|
|
# Check that Link != 0.
|
|
|
|
# CHECK: Link: {{[1-9][0-9]*}}
|
2013-06-14 00:38:02 +00:00
|
|
|
# CHECK: AddressAlignment: 2
|
2013-06-13 22:20:01 +00:00
|
|
|
# CHECK: SectionData (
|
|
|
|
# CHECK-NEXT: 0000: EBFE
|
|
|
|
# CHECK-NEXT: )
|