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
36
37
38
39
40
41
42
43
44
45
46
47
48
| ## Check yaml2obj is able to dump relocations
## that have no or a zero symbol associated.
# RUN: yaml2obj %s -o %t.o
# RUN: obj2yaml %t.o | FileCheck %s
# CHECK: --- !ELF
# CHECK-NEXT: FileHeader:
# CHECK-NEXT: Class: ELFCLASS64
# CHECK-NEXT: Data: ELFDATA2LSB
# CHECK-NEXT: Type: ET_REL
# CHECK-NEXT: Machine: EM_X86_64
# CHECK-NEXT: Sections:
# CHECK-NEXT: - Name: .text
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK-NEXT: Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
# CHECK-NEXT: - Name: .rela.text
# CHECK-NEXT: Type: SHT_RELA
# CHECK-NEXT: Link: .symtab
# CHECK-NEXT: EntSize: 0x0000000000000018
# CHECK-NEXT: Info: .text
# CHECK-NEXT: Relocations:
# CHECK-NEXT: - Offset: 0x0000000000000000
# CHECK-NEXT: Type: R_X86_64_NONE
# CHECK-NEXT: - Offset: 0x0000000000000004
# CHECK-NEXT: Type: R_X86_64_NONE
# CHECK-NEXT: Symbols: []
# CHECK-NEXT: ...
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
- Name: .rela.text
Type: SHT_RELA
Info: .text
Relocations:
- Offset: 0x0
Type: R_X86_64_NONE
- Offset: 0x4
Type: R_X86_64_NONE
Symbol: 0
|