• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: yaml2obj %s -o %t.o
2# RUN: llvm-objdump --file-headers --private-headers --section-headers --syms \
3# RUN:   --full-contents --dwarf=frames \
4# RUN:   --reloc %t.o | FileCheck %s --check-prefixes=CHECK,RELOC
5# RUN: llvm-objdump --file-headers --private-headers --section-headers --syms \
6# RUN:   --full-contents --dwarf=frames \
7# RUN:   --disassemble %t.o | FileCheck %s --check-prefixes=CHECK,DISASM
8
9## Test the ordering of most of the output. Note that --disassemble suppresses
10## --reloc, so we test them independently.
11
12## File headers (-f)
13# CHECK: file format elf64-x86-64
14# CHECK: architecture: x86_64
15# CHECK: start address: 0x0000000000000000
16## Private headers (-p)
17# CHECK: Program Header:
18# CHECK: Dynamic Section:
19## Section headers (-h)
20# CHECK: Sections:
21## Symbol table (-t)
22# CHECK: SYMBOL TABLE:
23## DWARF contents:
24# CHECK: .eh_frame contents:
25## Relocations (-r)
26# RELOC: RELOCATION RECORDS FOR [.text]:
27## Section contents (-s)
28# CHECK: Contents of section .rel.text:
29# CHECK: Contents of section .dynamic:
30# CHECK: Contents of section .symtab:
31# CHECK: Contents of section .strtab:
32# CHECK: Contents of section .shstrtab:
33## Disassembly (-d)
34# DISASM: Disassembly of section .text:
35
36!ELF
37FileHeader:
38  Class:    ELFCLASS64
39  Data:     ELFDATA2LSB
40  Type:     ET_REL
41  Machine:  EM_X86_64
42Sections:
43  - Name:    .text
44    Type:    SHT_PROGBITS
45    Flags:   [ SHF_ALLOC, SHF_EXECINSTR ]
46    Content: e800000000e800000000
47  - Name: .rel.text
48    Type: SHT_REL
49    Info: .text
50    Relocations:
51      - Offset: 0x1
52        Symbol: foo
53        Type: R_X86_64_32
54  - Name:    .dynamic
55    Type:    SHT_DYNAMIC
56    Flags:   [ SHF_WRITE, SHF_ALLOC ]
57    EntSize: 0x0000000000000010
58    Entries:
59      - Tag:   DT_INIT
60        Value: 0x00000000000006A0
61      - Tag:   DT_NULL
62        Value: 0x0000000000000000
63  - Name:         .eh_frame
64    Type:         SHT_X86_64_UNWIND
65    Flags:        [ SHF_ALLOC ]
66    AddressAlign: 0x0000000000000001
67    Content:      00000000
68Symbols:
69  - Name:    foo
70    Section: .text
71