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
39 RUN: llvm-readobj -dyn-relocations -expand-relocs \
40 RUN: %p/Inputs/rel-no-sec-table.elf-x86-64 | FileCheck %s --check-prefix=DYN2
42 // DYN2: Dynamic Relocations {
43 // DYN2-NEXT: Relocation {
44 // DYN2-NEXT: Offset: 0x12F0
45 // DYN2-NEXT: Type: R_X86_64_GLOB_DAT (6)
46 // DYN2-NEXT: Symbol: g
47 // DYN2-NEXT: Addend: 0x0