2010-10-04 18:44:25 +00:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
|
|
|
|
|
2010-10-05 15:48:37 +00:00
|
|
|
// Test that this produces a R_X86_64_GOT32 and that we have an undefined
|
|
|
|
// reference to _GLOBAL_OFFSET_TABLE_.
|
2010-10-04 18:44:25 +00:00
|
|
|
|
2010-10-04 19:51:39 +00:00
|
|
|
movl foo@GOT, %eax
|
|
|
|
movl foo@GOTPCREL(%rip), %eax
|
2010-10-04 18:44:25 +00:00
|
|
|
|
2010-10-19 17:39:10 +00:00
|
|
|
// CHECK: (('st_name', 0x00000005) # '_GLOBAL_OFFSET_TABLE_'
|
|
|
|
// CHECK-NEXT: ('st_bind', 0x00000001)
|
2010-10-05 15:48:37 +00:00
|
|
|
|
2010-10-04 18:44:25 +00:00
|
|
|
// CHECK: ('_relocations', [
|
2010-10-19 17:39:10 +00:00
|
|
|
// CHECK-NEXT: # Relocation 0x00000000
|
2010-10-04 18:44:25 +00:00
|
|
|
// CHECK-NEXT: (('r_offset',
|
|
|
|
// CHECK-NEXT: ('r_sym',
|
2010-10-19 17:39:10 +00:00
|
|
|
// CHECK-NEXT: ('r_type', 0x00000003)
|
2010-10-04 18:44:25 +00:00
|
|
|
// CHECK-NEXT: ('r_addend',
|
|
|
|
// CHECK-NEXT: ),
|
2010-10-19 17:39:10 +00:00
|
|
|
// CHECK-NEXT: # Relocation 0x00000001
|
2010-10-04 19:51:39 +00:00
|
|
|
// CHECK-NEXT: (('r_offset',
|
|
|
|
// CHECK-NEXT: ('r_sym',
|
2010-10-19 17:39:10 +00:00
|
|
|
// CHECK-NEXT: ('r_type', 0x00000009)
|
2010-10-04 19:51:39 +00:00
|
|
|
// CHECK-NEXT: ('r_addend',
|
|
|
|
// CHECK-NEXT: ),
|
2010-10-04 18:44:25 +00:00
|
|
|
// CHECK-NEXT: ])
|