• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump  --dump-section-data | FileCheck  %s
2
3// Test that we produce the correct relocation.
4
5	loope	0                 # R_X86_64_PC8
6	jmp	-256              # R_X86_64_PC32
7
8// CHECK:      # Section 2
9// CHECK-NEXT: (('sh_name', 0x00000001) # '.rela.text'
10// CHECK-NEXT:  ('sh_type', 0x00000004)
11// CHECK-NEXT:  ('sh_flags', 0x0000000000000000)
12// CHECK-NEXT:  ('sh_addr', 0x0000000000000000)
13// CHECK-NEXT:  ('sh_offset', 0x00000000000002e8)
14// CHECK-NEXT:  ('sh_size', 0x0000000000000030)
15// CHECK-NEXT:  ('sh_link', 0x00000006)
16// CHECK-NEXT:  ('sh_info', 0x00000001)
17// CHECK-NEXT:  ('sh_addralign', 0x0000000000000008)
18// CHECK-NEXT:  ('sh_entsize', 0x0000000000000018)
19// CHECK-NEXT:  ('_relocations', [
20// CHECK-NEXT:   # Relocation 0
21// CHECK-NEXT:   (('r_offset', 0x0000000000000001)
22// CHECK-NEXT:    ('r_sym', 0x00000000)
23// CHECK-NEXT:    ('r_type', 0x0000000f)
24// CHECK-NEXT:    ('r_addend', 0x0000000000000000)
25// CHECK-NEXT:   ),
26// CHECK-NEXT:   # Relocation 1
27// CHECK-NEXT:   (('r_offset', 0x0000000000000003)
28// CHECK-NEXT:    ('r_sym', 0x00000000)
29// CHECK-NEXT:    ('r_type', 0x00000002)
30// CHECK-NEXT:    ('r_addend', 0x0000000000000000)
31// CHECK-NEXT:   ),
32// CHECK-NEXT:  ])
33// CHECK-NEXT: ),
34