1 RUN: llvm-readobj -r --expand-relocs %p/Inputs/hello-world.elf-x86-64 \
3 RUN: llvm-readobj --dyn-relocations --expand-relocs \
4 RUN: %p/Inputs/hello-world.elf-x86-64 | FileCheck %s --check-prefix=DYN
6 // CHECK: Relocations [
7 // CHECK-NEXT: Section (8) .rela.dyn {
8 // CHECK-NEXT: Relocation {
9 // CHECK-NEXT: Offset: 0x4018D8
10 // CHECK-NEXT: Type: R_X86_64_GLOB_DAT (6)
11 // CHECK-NEXT: Symbol: __gmon_start__
12 // CHECK-NEXT: Addend: 0x0
15 // CHECK-NEXT: Section (9) .rela.plt {
16 // CHECK-NEXT: Relocation {
17 // CHECK-NEXT: Offset: 0x4018F8
18 // CHECK-NEXT: Type: R_X86_64_JUMP_SLOT (7)
19 // CHECK-NEXT: Symbol: __libc_start_main
20 // CHECK-NEXT: Addend: 0x0
22 // CHECK-NEXT: Relocation {
23 // CHECK-NEXT: Offset: 0x401900
24 // CHECK-NEXT: Type: R_X86_64_JUMP_SLOT (7)
25 // CHECK-NEXT: Symbol: puts
26 // CHECK-NEXT: Addend: 0x0
30 // DYN: Dynamic Relocations {
31 // DYN-NEXT: Relocation {
32 // DYN-NEXT: Offset: 0x4018D8
33 // DYN-NEXT: Type: R_X86_64_GLOB_DAT (6)
34 // DYN-NEXT: Symbol: __gmon_start__
35 // DYN-NEXT: Addend: 0x0
37 // DYN-NEXT: Relocation {
38 // DYN-NEXT: Offset: 0x4018F8
39 // DYN-NEXT: Type: R_X86_64_JUMP_SLOT (7)
40 // DYN-NEXT: Symbol: __libc_start_main
41 // DYN-NEXT: Addend: 0x0
43 // DYN-NEXT: Relocation {
44 // DYN-NEXT: Offset: 0x401900
45 // DYN-NEXT: Type: R_X86_64_JUMP_SLOT (7)
46 // DYN-NEXT: Symbol: puts
47 // DYN-NEXT: Addend: 0x0
51 RUN: llvm-readobj --dyn-relocations --expand-relocs \
52 RUN: %p/Inputs/rel-no-sec-table.elf-x86-64 | FileCheck %s --check-prefix=DYN2
54 // DYN2: Dynamic Relocations {
55 // DYN2-NEXT: Relocation {
56 // DYN2-NEXT: Offset: 0x12F0
57 // DYN2-NEXT: Type: R_X86_64_GLOB_DAT (6)
58 // DYN2-NEXT: Symbol: g
59 // DYN2-NEXT: Addend: 0x0