2010-09-21 03:20:47 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
|
|
|
|
|
2010-09-30 11:11:42 +08:00
|
|
|
// Test that we produce a R_X86_64_32S or R_X86_64_32.
|
2010-09-21 03:20:47 +08:00
|
|
|
|
2010-09-30 11:11:42 +08:00
|
|
|
bar:
|
|
|
|
movl $bar, %edx // R_X86_64_32
|
|
|
|
movq $bar, %rdx // R_X86_64_32S
|
|
|
|
movq $bar, bar(%rip) // R_X86_64_32S
|
|
|
|
movl bar, %edx // R_X86_64_32S
|
|
|
|
movq bar, %rdx // R_X86_64_32S
|
|
|
|
.long bar // R_X86_64_32
|
2010-09-21 03:20:47 +08:00
|
|
|
|
2010-10-19 08:19:49 +08:00
|
|
|
// CHECK: # Section 1
|
|
|
|
// CHECK: (('sh_name', 1) # '.text'
|
|
|
|
|
|
|
|
// CHECK: # Symbol 2
|
|
|
|
// CHECK: (('st_name', 0) # ''
|
|
|
|
// CHECK: ('st_bind', 0)
|
|
|
|
// CHECK ('st_type', 3)
|
|
|
|
// CHECK: ('st_other', 0)
|
|
|
|
// CHECK: ('st_shndx', 1)
|
|
|
|
|
|
|
|
// CHECK: # Relocation 0
|
|
|
|
// CHECK-NEXT: (('r_offset', 1)
|
|
|
|
// CHECK-NEXT: ('r_sym', 2)
|
|
|
|
// CHECK-NEXT: ('r_type', 10)
|
2010-09-30 11:11:42 +08:00
|
|
|
// CHECK-NEXT: ('r_addend',
|
|
|
|
|
2010-10-19 08:19:49 +08:00
|
|
|
// CHECK: # Relocation 1
|
|
|
|
// CHECK-NEXT: (('r_offset', 8)
|
|
|
|
// CHECK-NEXT: ('r_sym', 2)
|
|
|
|
// CHECK-NEXT: ('r_type', 11)
|
2010-09-30 11:11:42 +08:00
|
|
|
// CHECK-NEXT: ('r_addend',
|
|
|
|
|
2010-10-19 08:19:49 +08:00
|
|
|
// CHECK: # Relocation 2
|
|
|
|
// CHECK-NEXT: (('r_offset', 19)
|
|
|
|
// CHECK-NEXT: ('r_sym', 2)
|
|
|
|
// CHECK-NEXT: ('r_type', 11)
|
2010-09-30 11:11:42 +08:00
|
|
|
// CHECK-NEXT: ('r_addend',
|
|
|
|
|
2010-10-19 08:19:49 +08:00
|
|
|
// CHECK: # Relocation 3
|
|
|
|
// CHECK-NEXT: (('r_offset', 26)
|
|
|
|
// CHECK-NEXT: ('r_sym', 2)
|
|
|
|
// CHECK-NEXT: ('r_type', 11)
|
2010-09-30 11:11:42 +08:00
|
|
|
// CHECK-NEXT: ('r_addend',
|
|
|
|
|
2010-10-19 08:19:49 +08:00
|
|
|
// CHECK: # Relocation 4
|
|
|
|
// CHECK-NEXT: (('r_offset', 34)
|
|
|
|
// CHECK-NEXT: ('r_sym', 2)
|
|
|
|
// CHECK-NEXT: ('r_type', 11)
|
2010-09-30 11:11:42 +08:00
|
|
|
// CHECK-NEXT: ('r_addend',
|
|
|
|
|
2010-10-19 08:19:49 +08:00
|
|
|
// CHECK: # Relocation 5
|
|
|
|
// CHECK-NEXT: (('r_offset', 38)
|
|
|
|
// CHECK-NEXT: ('r_sym', 2)
|
|
|
|
// CHECK-NEXT: ('r_type', 10)
|
2010-09-30 11:11:42 +08:00
|
|
|
// CHECK-NEXT: ('r_addend',
|