• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1RUN: llvm-readobj -r --expand-relocs %p/Inputs/hello-world.elf-x86-64 \
2RUN:   | FileCheck %s
3RUN: llvm-readobj --dyn-relocations --expand-relocs \
4RUN:   %p/Inputs/hello-world.elf-x86-64 | FileCheck %s --check-prefix=DYN
5
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
13// CHECK-NEXT:    }
14// CHECK-NEXT:  }
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
21// CHECK-NEXT:    }
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
27// CHECK-NEXT:    }
28// CHECK-NEXT:  }
29
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
36// DYN-NEXT:   }
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
42// DYN-NEXT:   }
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
48// DYN-NEXT:   }
49// DYN-NEXT: }
50
51RUN: llvm-readobj --dyn-relocations --expand-relocs \
52RUN:   %p/Inputs/rel-no-sec-table.elf-x86-64 | FileCheck %s --check-prefix=DYN2
53
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
60// DYN2-NEXT:   }
61// DYN2-NEXT: }
62