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