[RuntimeDyld] Add support for R_X86_64_PC8 relocation.
[oota-llvm.git] / test / ExecutionEngine / RuntimeDyld / X86 / ELF_x64-64_PC8_relocations.s
1 # RUN: llvm-mc -triple=x86_64-pc-linux -relocation-model=pic -filetype=obj -o %T/test_ELF_x86-64_PC8.o %s
2 # RUN: llvm-rtdyld -triple=x86_64-pc-linux -verify -map-section test_ELF_x86-64_PC8.o,.text.bar=0x10000 -map-section test_ELF_x86-64_PC8.o,.text.baz=0x10040 %T/test_ELF_x86-64_PC8.o
3 # RUN: llvm-rtdyld -triple=x86_64-pc-linux -verify -map-section test_ELF_x86-64_PC8.o,.text.baz=0x10000 -map-section test_ELF_x86-64_PC8.o,.text.bar=0x10040 %T/test_ELF_x86-64_PC8.o
4
5 # Test that R_X86_64_PC8 relocation works.
6
7   .section .text.bar,"ax"
8         .align  16, 0x90
9         .type   bar,@function
10 bar:
11         retq
12 .Ltmp1:
13         .size   bar, .Ltmp1-bar
14
15   .section .text.baz,"ax"
16         .align  16, 0x90
17         .type   baz,@function
18 baz:
19   movq  %rdi, %rcx
20   jrcxz bar
21         retq
22 .Ltmp2:
23         .size   baz, .Ltmp2-baz
24
25
26         .section        ".note.GNU-stack","",@progbits