# RUN: yaml2obj %s -o %t.o
# RUN: llvm-readobj -a %t.o | FileCheck %s --check-prefix LLVM-ALL
# RUN: llvm-readobj --all %t.o | FileCheck %s --check-prefix LLVM-ALL
# LLVM-ALL: Format: elf32-i386
# LLVM-ALL: Arch: i386
# LLVM-ALL: AddressSize: 32bit
# LLVM-ALL: LoadName:
# LLVM-ALL: ElfHeader {
# LLVM-ALL: Sections [
# LLVM-ALL: ProgramHeaders [
# LLVM-ALL: Relocations [
# LLVM-ALL: EHFrameHeader {
# LLVM-ALL: .eh_frame section at offset 0x1128 address 0x0:
# LLVM-ALL: Symbols [
# LLVM-ALL: VersionSymbols [
# LLVM-ALL: VersionDefinitions [
# LLVM-ALL: VersionRequirements [
# LLVM-ALL: Addrsig [
# LLVM-ALL: Notes [
# LLVM-ALL: StackSizes [
# RUN: llvm-readelf -a %t.o | FileCheck %s --check-prefix GNU-ALL
# RUN: llvm-readelf --all %t.o | FileCheck %s --check-prefix GNU-ALL
# GNU-ALL: ELF Header:
# GNU-ALL: There are {{.*}} section headers, starting at offset {{.*}}:
# GNU-ALL: Program Headers:
# GNU-ALL: Dynamic section at offset {{.*}} contains {{.*}} entries:
# GNU-ALL: Relocation section '.rela.data' at offset {{.*}} contains {{.*}} entries:
# GNU-ALL: EHFrameHeader {
# GNU-ALL: .eh_frame section at offset {{.*}} address 0x0:
# GNU-ALL: Symbol table '.symtab' contains {{.*}} entries:
# GNU-ALL: Version symbols section '.gnu.version' contains {{.*}} entries:
# GNU-ALL: Version definition section '.gnu.version_d' contains {{.*}} entries:
# GNU-ALL: Version needs section '.gnu.version_r' contains {{.*}} entries:
# GNU-ALL: There are no section groups in this file.
# GNU-ALL: Histogram for bucket list length (total of 1 buckets)
# GNU-ALL: Displaying notes found
--- !ELF
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_386
Sections:
- Name: .data
Type: SHT_PROGBITS
- Name: .rela.data
Type: SHT_REL
Relocations:
- Name: .gnu.version
Type: SHT_GNU_versym
Entries: [ 0 ]
- Name: .gnu.version_d
Type: SHT_GNU_verdef
Entries: []
- Name: .gnu.version_r
Type: SHT_GNU_verneed
Dependencies:
- Version: 1
File: verneed1.so.0
Entries: []
- Name: .dynamic
Type: SHT_DYNAMIC
Address: 0x1000
AddressAlign: 0x1000
Entries:
- Tag: DT_HASH
Value: 0x1100
- Tag: DT_NULL
Value: 0
- Name: .hash
Type: SHT_HASH
Link: 0
Bucket: [ 1 ]
Chain: [ 0, 0 ]
Address: 0x1100
AddressAlign: 0x100
- Name: .eh_frame_hdr
Type: SHT_PROGBITS
## An arbitrary linker-generated valid content.
Content: 011b033b140000000100000000f0ffff30000000
- Name: .eh_frame
Type: SHT_PROGBITS
AddressAlign: 8
## An arbitrary linker-generated valid content.
Content: 1400000000000000017a5200017810011b0c070890010000100000001c000000c8efffff0100000000000000
- Name: .note.gnu.build-id
Type: SHT_NOTE
Flags: [ SHF_ALLOC ]
Address: 0x1500
## An arbitrary linker-generated valid content.
Content: 040000001000000003000000474E55004FCB712AA6387724A9F465A32CD8C14B
ProgramHeaders:
- Type: PT_LOAD
VAddr: 0x1000
FirstSec: .dynamic
LastSec: .hash
- Type: PT_DYNAMIC
FirstSec: .dynamic
LastSec: .dynamic
- Type: PT_GNU_EH_FRAME
FirstSec: .eh_frame_hdr
LastSec: .eh_frame_hdr
- Type: PT_NOTE
FirstSec: .note.gnu.build-id
LastSec: .note.gnu.build-id
Symbols: []
DynamicSymbols:
- Name: foo