1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s 2 3 // Test that this produces a R_X86_64_GOT32 and that we have an undefined 4 // reference to _GLOBAL_OFFSET_TABLE_. 5 6 movl foo@GOT, %eax 7 movl foo@GOTPCREL(%rip), %eax 8 9 // CHECK: ('_relocations', [ 10 // CHECK-NEXT: # Relocation 0 11 // CHECK-NEXT: (('r_offset', 12 // CHECK-NEXT: ('r_sym', 13 // CHECK-NEXT: ('r_type', 0x00000003) 14 // CHECK-NEXT: ('r_addend', 15 // CHECK-NEXT: ), 16 // CHECK-NEXT: # Relocation 1 17 // CHECK-NEXT: (('r_offset', 18 // CHECK-NEXT: ('r_sym', 19 // CHECK-NEXT: ('r_type', 0x00000009) 20 // CHECK-NEXT: ('r_addend', 21 // CHECK-NEXT: ), 22 // CHECK-NEXT: ]) 23 24 // CHECK: (('st_name', 0x00000005) # '_GLOBAL_OFFSET_TABLE_' 25 // CHECK-NEXT: ('st_bind', 0x1) 26